How to use helpers in layout ?

M

MiG

Hello,

I'm trying to use any helper in a layout but it raises

"undefined local variable or method `test_helper' for =20
#<ActionView::Base:0x408651f4>"

The method is written in an application_helper.rb so is available to any
view (where works fine).

How can I make it available to layout too?

Thank you for help,
MiG
 
J

James Britt

MiG said:
Hello,

I'm trying to use any helper in a layout but it raises

"undefined local variable or method `test_helper' for
#<ActionView::Base:0x408651f4>"

The method is written in an application_helper.rb so is available to any
view (where works fine).

How can I make it available to layout too?

Try here, the Rails mailing list:

http://lists.rubyonrails.org/mailman/listinfo/rails

James

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top