# Where do helper for a controller go?

**URL:** <https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270>\
**Category:** Rails\
**Created:** [April 23, 2009, 11:23am UTC](https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270 "2009-04-23T11:23:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [April 23, 2009, 11:23am UTC](https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270/1 "2009-04-23T11:23:33Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [April 24, 2009, 12:02am UTC](https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270/2 "2009-04-24T00:02:47Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [April 24, 2009, 1:41am UTC](https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270/3 "2009-04-24T01:41:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cojones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9f8e36/32.png) [@cojones](https://www.ruby-forum.com/u/cojones)\
**Post date:** [April 24, 2009, 1:54am UTC](https://www.ruby-forum.com/t/where-do-helper-for-a-controller-go/166270/4 "2009-04-24T01:54:08Z")

</div>

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