On 25 Nov 2008, at 14:37, Ray Krueger wrote:

>
>> That's about right. Because there is an application.rb in an
>> appropriate place in the search path Rails may find that file and try
>> to load it first. While you might be able to fiddle with those so  
>> that
>> rails found your model class first that would then probably screw
>> things up when Rails is actually looking for ApplicationController.
>> You might be able to get round this by just explicitly loading your
>> model rather than relying on the magical loading
>
> Lame! :P
>
> Thanks for the tip Frederick, would you be able to clue me into where
> I can read about doing that?
> I'm too new at this to know how to do anything other than "magical
> loading" heh.

Put your model class in something called not application.rb.
Then use require_dependency to require that file. Where exactly you do  
that is up for some debate but you could start with the bottom of  
application.rb (as in where ApplicationController sits)

Fred
>
>
>>
>> Wait for Rails 2.3 where ApplicationController will live in
>> application_controller.rb :-)
>
> Yeah thought about that, I wasn't sure if Edge was too shaky right now
> to try and jump on that though.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to