I'm not sure about your specific problem, but you could try replacing
your code with the following:
config.load_paths += Dir["#{RAILS_ROOT}/app/models/**/**"]
That loads all files in all subdirs in your models directory. It
works for me in all environments (in Rails 2.3, at least, haven't
tried it on earlier versions).
Casey
On Jan 6, 5:30 am, comopasta Gr <[email protected]> wrote:
> :-D :-D
>
> I can't deny you are right guys.
> The quote is taken about 100 pixels above my text. It is part of the
> original question of the post (almost the last line in it). I don't
> really like quoting whole texts because it duplicates all the stuff...
>
> If for some reason you can't see the original question I paste it here
> again.
>
> ---------------------------------------
>
> Posted by Student (Guest) on 17.10.2007 18:04
> This works for me in production but not development.
>
> Problem:
> I have a need to group models into subdirectories which in no way map
> to models.
>
> Suggested solution (as per article):
> Add the following code to the Rails::Initializer.run block in
> environment.rb:
>
> config.frameworks -= [ :action_web_service ]
>
> config.load_paths += %W[
> #{RAILS_ROOT}/app/models/helpers
> #{RAILS_ROOT}/app/models/autogenerated
> #{RAILS_ROOT}/app/models/database
> ]
>
> New Problem:
> In development mode, these new directories are not picked up.
>
> I've tried to trace the flow, but no love.
>
> ---------------------------------------
>
> Cheers.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--
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.