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 :) -- Posted via http://www.ruby-forum.com/.
Rafael Schaer { beYou media }
2009-Apr-23 22:02 UTC
Re: where do helper for a controller go?
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...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 :) > -- > Posted viahttp://www.ruby-forum.com/.
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. -- Posted via http://www.ruby-forum.com/.