Aaron Blohowiak on 2 Mar 2007 04:50:18 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] Calling a helper based on dynamically created string



but you should know, send bypasses visibility!


Aaron Blohowiak


On Mar 1, 2007, at 11:30 PM, Mat Schaffer wrote:


On Mar 1, 2007, at 11:26 PM, Mike Zornek wrote:

You know how when you are using the new resource features in Rails 1.2 it
will create all these helper methods for you. Like if I had a resource for
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 helper based
on a string I create. I'd like to create a string like
`object.class.to_s.downcase.pluralize + '_url' and then call that helper.
How can I do this?

Doesn't send work?  Seems like it should.
-Mat
_______________________________________________
To unsubscribe or change your settings, visit:


_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk