Where do helper for a controller go?

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 :slight_smile:

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 S. [email protected]

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.

in fact, if you are beginning, Altered Beast is better (just got a nice
tip there :).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs