Domanda

I'm using the friendly_id gem (Rails 3.2) and I want a specific action (edit) to not use the friendly id slug. How can i do this?

Example:

for show action: "site.com/object/friendly_id"
for edit action: "site.com/object/id/edit"

Is this possible? Thanks

È stato utile?

Soluzione

Instead of using object send id as a parameter with path, for example, use this, for edit

edit_user_path(@user.id)

for show,

user_path(@user)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top