# Shared Helpers -- Newbie Help

**URL:** <https://www.ruby-forum.com/t/shared-helpers-newbie-help/111019>\
**Category:** Rails\
**Created:** [August 1, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/shared-helpers-newbie-help/111019 "2007-08-01T23:40:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghoti143](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Post date:** [August 1, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/shared-helpers-newbie-help/111019/1 "2007-08-01T23:40:31Z")

</div>

I am trying to make a shared helper. I have searched near and far for  
every piece of help, yet I am still stuck. I am assuming it should be  
quite easy; I guess just not for me.

# helpers/fun\_helper.rb – Note: this works fine from the

fun\_controller  
module FunHelper  
def test\_foo2  
“test”  
end  
end

# test\_controller.rb

class TestController \< ApplicationController  
helper :fun  
end

# views/test/index.rhtml
\<%= test\_foo2 %\>

I am getting the following error:

> > undefined local variable or method `test\_foo2’ for …

Thank you,

Mike

---

<div class="post-metadata">

**Author:** ![ghoti143](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Post date:** [August 3, 2007, 4:32am UTC](https://www.ruby-forum.com/t/shared-helpers-newbie-help/111019/2 "2007-08-03T04:32:51Z")

</div>

if you want it to be available from anywhere, put it in helpers/  
application\_helper.rb
