I am using Ruby on Rails 3.0.7, and I would like to generate link_to for the action of the edit controller, dynamically. I have to use it in a partial template, but the problem is that I provide the same partial template for different model data (i.e. I pass in local variables from different instances of the class in this).
Therefore, I cannot use the RoR magic path route
`edit_<singular_name_of_the_resource>_path(<resource_class_instance>)`.
I would like to do something like the following:
link_to( @resource_class_instance, :action => 'edit')
Is it possible? If so, how can I do this?
Backo source share