Thursday, January 26, 2012

Re: [Rails] Helper or ???

On 26 January 2012 14:47, Walter Lee Davis <waltd@wdstudio.com> wrote:
> I had it in the controller, but I didn't like the look of having to declare an instance variable inside each method that needed this (new and create and edit and update). The helper was there for the asking in each view, so it seemed DRYer. Is there a way to have my cake and eat it too?

helper_method :my_controller_method

?

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate