Hi! I have a lot of models in my app/models directory.. I thought that it would be nice to group them into sub folders.. like app/models/foo/*.rb and app/models/bar/*.rb How to do this? When I just move them into folders, they will not be loaded.. But when i execute Foo::Model in console, I will get an error but after that Model is loaded... So this must be possible anyhow, it actually nearly works. I also tried to generate models like ./script/generate model Foo::Model or ./script/generate model Foo/Model This actually works, but I would like to use Model instead of Foo::Model.. so this module/namscape stuff is not what I''m looking for. Would be nice if you could help me thanks :) -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
http://errtheblog.com/post/5 On Oct 14, 2:09 pm, Jakob Bliz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi! > > I have a lot of models in my app/models directory.. > I thought that it would be nice to group them into sub folders.. > > like app/models/foo/*.rb > and app/models/bar/*.rb > > How to do this? > When I just move them into folders, they will not be loaded.. > But when i execute Foo::Model in console, I will get an error > but after that Model is loaded... > So this must be possible anyhow, it actually nearly works. > > I also tried to generate models like ./script/generate model Foo::Model > or ./script/generate model Foo/Model > This actually works, but I would like to use Model instead of > Foo::Model.. so this module/namscape stuff is not what I''m looking for. > > Would be nice if you could help me > > thanks :) > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff, Thank you VERY much -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---