For organizational purposes, I would like to create subdirectories in my apps/model/ directory. Is there any easy way to do this while still having the ability to refer to the derived active record class models? I.e. apps/models/blog/post.rb: class Post < ActiveRecord::Base ... end Post.new ... Scott Taylor
Scott Taylor wrote:> For organizational purposes, I would like to create subdirectories in > my apps/model/ directory...Google says: http://myles.eftos.id.au/blog/archives/15 -- Posted via http://www.ruby-forum.com/.
Jeff Everett
2006-Jun-29 14:23 UTC
[Rails] Re: Newbie question: subdirectories in app/models
I don''t think the question was about subdirs for controllers. You can have app/models/subdir/post.rb and Rails will load Post in the normal way. But this can lead to namespace conflicts if you have another post.rb someplace, so I would use it sparingly. HTH, Jeff On 6/28/06, David C. <dave@pezians.com> wrote:> > Scott Taylor wrote: > > For organizational purposes, I would like to create subdirectories in > > my apps/model/ directory... > > Google says: http://myles.eftos.id.au/blog/archives/15 > > > > -- > 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/20060629/cd3f8880/attachment.html