Forum: Ruby on Rails where do helper for a controller go?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-23 11:23
Hey,

I just wanna make sure I'm right... I need to DRY my controller that's
why I put the code of 2 different actions into one action but I'm not
sure where to put it... in the controller under private? in the helper?
in the lib?

I'd put it in a action under private in the same controller. Is that
right?

Thanks for helping me with my confusion :)
2808b5c359edcb77ec783e3793c8d381?d=identicon&s=25 Rafael Schaer { beYou media } (Guest)
on 2009-04-24 00:02
(Received via mailing list)
Hi Heinz,

can you be more specific?
May be you could move it to your business logic, e.g.


On 23 Apr., 11:23, Heinz Strunk <rails-mailing-l...@andreas-s.net>
96fc3b82ceb54945fecca2fbdddd85a2?d=identicon&s=25 Py Jay (ppjunty)
on 2009-04-24 01:41
Heinz, methods in the helpers will be available (included) in
the views, not in the controllers.
Check a nice open source project, like the Mephisto, so you can
see how more experienced railers solve such design problems.
96fc3b82ceb54945fecca2fbdddd85a2?d=identicon&s=25 Py Jay (ppjunty)
on 2009-04-24 01:54
in fact, if you are beginning, Altered Beast is better (just got a nice
tip there :).
This topic is locked and can not be replied to.