[Rails] Very weird issue - Function not being recognized in
template?
softwareengineer 99
softwareengineer99 at yahoo.com
Thu Feb 9 00:58:03 GMT 2006
I created a function before going to dinner and placed it in application.rb. Something like:
def at_home
...
end
Then I called it from my .rhtml file like:
<% if at_home %>
.....
<% end %>
The function was working perfectly (I tested it before leaving). When I got back I keep getting
undefined local variable or method `at_home' for #<#<Class:0xb6e92960>:0xb6e92898
The weird thing is that I am calling the same function in my controller and it does not raise this error there?
The only other thing happened is that I rebooted the server.
So my question is does any one have an idea why something like this would happen? Why is my function in application.rb being recognized by the controller but not being recognized by my template
Thoughts and ideas are greatly appreciated.
Thanks
Frank
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060209/178493e7/attachment.html
More information about the Rails
mailing list