lundi 25 juillet 2016

How to modify Rails path names dynamically?

My params[:type] equals item (singular)

I need to send the user to

items_path(name: params[:name])

I need to pluralize the params[:type] part of the path and merge it with my view to get my link right, and I'm struggling to do that.

Aucun commentaire:

Enregistrer un commentaire