I did some stuff to have to_param
return a perma-url so I'd have seo friendly links. Upon creation and update it will generate and return the perma-url in a to_param
method that I put in the model. However this causing me some grief in other areas. I have a form that looks like this:
<% @apps.each do |app| %>
<% fields_for "[id][]", app do |fields| %>
....
this fails terribly since it tries to insert the perma-url in place of the id. If I could just restrict to_param
by action, that could solve things. If I change app to app.id, that fails since I have stuff like this: fields.check_box :is_featured
. I suppose I could get the app instance, but that feels hacky.
Again please excuse my lack of rails-foo ;)