Rails caching model

I’m having some trouble adding a method to one of my active record
models, I added one method fine but when I added another method I got
the error message “undefined method”, I’ve restarted the server, the
pc but this hasnt made any difference, it appears that its running in
developement as the production log is empty and when using <
%=ENV[‘RAILS_ENV’]%> its outputting “developement”. I’m running
instant rails with a rails version of 1.1.6. Any suggestions?

Cheers

Teesea

Hi –

On Sat, 3 Mar 2007, teesea wrote:

I’m having some trouble adding a method to one of my active record
models, I added one method fine but when I added another method I got
the error message “undefined method”, I’ve restarted the server, the
pc but this hasnt made any difference, it appears that its running in
developement as the production log is empty and when using <
%=ENV[‘RAILS_ENV’]%> its outputting “developement”. I’m running
instant rails with a rails version of 1.1.6. Any suggestions?

There are many reasons you could be getting this error – or, I should
say, one reason (you’re calling an undefined method :slight_smile: but many ways
for that to happen.

First thing to check: is the method inside the model class? Make sure
it is not defined after the final “end” of the class definition block.

David


Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
(See what readers are saying! http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)