Forum: Ruby on Rails Calling a helper based on dynamically created string

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2dd4f0af6b0137e9a0798b1f1abb9b00?d=identicon&s=25 Mike Zornek (Guest)
on 2007-03-02 04:51
(Received via mailing list)
You know how when you are using the new resource features in Rails 1.2
will create all these helper methods for you. Like if I had a resource
my `Comment` class I'd get `comments_url`, `comments_path`,
`comment_path(1)`, etc. Well let's say I'm trying to dry up my views --
of these crud pages are just very repetitive -- how do I call a helper
on a string I create. I'd like to create a string like
`object.class.to_s.downcase.pluralize + '_url' and then call that
How can I do this?

~ Mike
This topic is locked and can not be replied to.