# Modularized controller can't find application\_helper methods

**URL:** <https://www.ruby-forum.com/t/modularized-controller-cant-find-application-helper-methods/70581>\
**Category:** Rails\
**Created:** [September 30, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/modularized-controller-cant-find-application-helper-methods/70581 "2006-09-30T13:37:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [September 30, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/modularized-controller-cant-find-application-helper-methods/70581/1 "2006-09-30T13:37:06Z")

</div>

Hey everyone,

Im having this weird problem. I made a controller by calling it  
home/my\_inbox to try to modularize everything. However, I cant call any  
methods from the application\_helper.rb file. Any reason why?

NoMethodError in Home/my inboxController#message

undefined method `book\_viewing\_message?’ for  
#Home::MyInboxController:0x3a311b0

RAILS\_ROOT: ./script/…/config/…  
Application Trace | Framework Trace | Full Trace

#{RAILS\_ROOT}/app/controllers/home/my\_inbox\_controller.rb:12:in  
`message’

---

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [March 17, 2008, 5:46am UTC](https://www.ruby-forum.com/t/modularized-controller-cant-find-application-helper-methods/70581/2 "2008-03-17T05:46:19Z")

</div>

Aryk G. wrote:

> home/my\_inbox to try to modularize everything. However, I cant call any

It looks like you are trying to call it directly from the controller,  
you should be calling the method from the view template instead. Methods  
defined in application\_helper.rb are available to all view templates,  
not directly from the controller.

(You can do it, but you need to define a couple of other things inside  
the Application Controller, and it’s not very clean)

I’d personally put the required methods into a separate class/module in  
the lib directory and then require them from the controllers you need to  
use.

Mac
