I''m setting up my first real rails app, and I''ve run into the following problem. I have an admin area that now contains many controllers. To keep things clean, i''ve grouped my controllers in an "admin" folder. For example, I have "http://myapp.com/admin/member/" and http://myapp.com/admin/press/" and http://myapp.com/admin/users/" I''ve updated the controllers, accordingly (class Admin::MemberController < ApplicationController for example), and all works fine - as long as I remove the admin_controller.rb file from the root of the admin folder. If exists, my app will not look within the "member" folder to find the member controller. I''d like to keep the admin_controller there so that i can set up a default admin page with links to all the sections. Am I missing something with routing that could help me out? Thanks in advance, bryan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The solution you''re looking for is probably in using routes to get what you want, not controller modules. On Mar 24, 2007, at 3:56 PM, BryanMTL wrote:> > I''m setting up my first real rails app, and I''ve run into the > following problem. > > I have an admin area that now contains many controllers. To keep > things clean, i''ve grouped my controllers in an "admin" folder. > > For example, I have "http://myapp.com/admin/member/" and > http://myapp.com/admin/press/" and http://myapp.com/admin/users/" > > I''ve updated the controllers, accordingly (class > Admin::MemberController < ApplicationController for example), and all > works fine - as long as I remove the admin_controller.rb file from the > root of the admin folder. If exists, my app will not look within the > "member" folder to find the member controller. > > I''d like to keep the admin_controller there so that i can set up a > default admin page with links to all the sections. Am I missing > something with routing that could help me out? > > Thanks in advance, > > bryan > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
any idea what kind of route i could set up? I''d like to have an action reply to /admin/ requests. def index end for example..... TIA, Bryan On Mar 24, 6:10 pm, Jason Perry <ambet...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The solution you''re looking for is probably in using routes to get > what you want, not controller modules. > > On Mar 24, 2007, at 3:56 PM,BryanMTLwrote: > > > > > I''m setting up my first real rails app, and I''ve run into the > > following problem. > > > I have an admin area that now contains many controllers. To keep > > things clean, i''ve grouped my controllers in an "admin" folder. > > > For example, I have "http://myapp.com/admin/member/" and > >http://myapp.com/admin/press/" andhttp://myapp.com/admin/users/" > > > I''ve updated the controllers, accordingly (class > > Admin::MemberController < ApplicationController for example), and all > > works fine - as long as I remove the admin_controller.rb file from the > > root of the admin folder. If exists, my app will not look within the > > "member" folder to find the member controller. > > > I''d like to keep the admin_controller there so that i can set up a > > default admin page with links to all the sections. Am I missing > > something with routing that could help me out? > > > Thanks in advance, > > > bryan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---