Duane Johnson
2005-Feb-26 18:46 UTC
Is it my code or is it some hidden magic that causes this error?
I used a hack in 0.9.5 to get a model to be included consistently throughout my application: I put a "load ''customer.rb''" at the top of application.rb. This is necessary for my session data to be valid for each page. For some reason, just ''require''ing it does not work... If I use ''require'', the app dies and the log says that it couldn''t reconstruct the data in the session because the Customer class doesn''t exist. Ok, so that''s my motivation for having a ''load'' statement. Now, in 0.10, I get the following error when I load the page http://dev.mytechsupport.com:1001/customer/info : NoMethodError in <controller not set>#<action not set> undefined method `const_available?'' for Customer:Class ./script/server:51 Why can''t it find the const_available? method if it expects it to exist? Is my forced ''load'' loading the model too early and thus messing up some magic later on? Thank-you, Duane Johnson (canadaduane)