Ruby on Rails Tuesday, May 4, 2010

On May 4, 2:57 am, "Mike P." <li...@ruby-forum.com> wrote:

> I would have probably just used "require ../models/model_a.rb", but I
> found the following at StackOverflow:
>
> "One way to solve this would be to explicitly require the model file
> aircraft.rb. However, you will find this approach quickly leads to
> insanity as it will break the Rails auto-loader in subtle and
> astonishing ways. Rails is much easier if you work with the Rails class
> loader, not against it."

That can indeed happen (the thing that breaks is usually the code
reloading in development mode).
Does the rest of your app pick up this model automatically. How/where
is this class in /lib being used ?

Fred

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment