Is a decorator, like Draper, a good place to store the controller and
routes associated with a given model?
I would like to be able to pass one or several model objects to a generic
view, and have the view automatically generate links to the actions
associated with the objects. Like this:
link_to object.public_send(attribute),
{ :controller => object.controller_path,
:action => :show,
:id => object.id }
Thank you for any suggestions of what would be a common practice.
I have also posted this question on
SO: http://stackoverflow.com/questions/12713784.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/boHiwI4JxsIJ.
For more options, visit https://groups.google.com/groups/opt_out.