On 26 January 2012 14:51, Michael Pavling <pavling@gmail.com> wrote:
> 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
Michael: I don't think that addresses the problem, unless I
misunderstand. The OP doesn't need the method available in the
controller *and* the view, he is just not sure about which it should
be.
Colin
--
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.
No comments:
Post a Comment