Did you try
require "models/a/folder"
That''s what I''ve been using for other pieces of my model.
-Rob
On 3/26/06, Thomas Kwan <thomask@etechfocus.com>
wrote:>
> Anyone tried to access the model class from a module in the lib
> directory?
> How should the require line look like?
>
> I have class called A::Folder in app/models/a/folder.rb, and I was
> trying
> to include it in app/lib/common.rb by adding
>
> require "a/folder"
>
> But I am getting the following error:
>
> NameError (uninitialized constant Folder):
> /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5
> /lib/active_support/dependencies.rb:195:in
> `const_missing''
> ...
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060327/ca729301/attachment.html