Generate a `link_to` to the controller action `edit`, dynamically
问题 I am using Ruby on Rails 3.0.7 and I would like to generate a link_to to the controller action edit , dynamically . I have to use it in a partial template but the issue is that I am rendering that same partial template for different model data (that is, I pass local variables of different class instances in that). So I can not use the route "magical RoR way" `edit_<singular_name_of_the_resource>_path(<resource_class_instance>)`. I would like to make something like the following: link_to(