[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PhillyOnRails] Calling a helper based on dynamically created string
On Mar 1, 2007, at 11:26 PM, Mike Zornek wrote:
You know how when you are using the new resource features in Rails
will create all these helper methods for you. Like if I had a
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 -- some
of these crud pages are just very repetitive -- how do I call a
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?
Doesn't send work? Seems like it should.
To unsubscribe or change your settings, visit: