Hey guys. I noticed in an example from the active scaffold documentation that it seems to be possible to put rails controllers in modules, a la "class Admin::CompaniesController < ApplicationController". Does anyone know anything about this? What do you name the file? Do you put it in a subdirectory? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Just: script/generate model controlelr admin::companies And that is was! It will create a controller named CompanyController in a subdir named admin. From the ruby point of view, CompanyController belongs to admin namespace (class Admin::CompanyController) Regards, Jean-Etienne woa.hu -- Posted via 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 groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks, thats very helpful. one more question: what address does this get mapped to? ../admin/companies doesn''t seem to work...? On May 30, 6:54 am, Jean-Etienne Durand <rails-mailing-l...@andreas- s.net> wrote:> Hi, > > Just: script/generate model controlelr admin::companies > And that is was! > > It will create a controller named CompanyController in a subdir named > admin. From the ruby point of view, CompanyController belongs to admin > namespace (class Admin::CompanyController) > > Regards, > Jean-Etiennehttp://www.woa.hu > > -- > 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 groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Funny, I just started using this and wanted to understand exactly that. I can''t test it in my app right now, but I''d venture a guess that it would map to: admin/company/ Here''s a question... I notice you''re running the model generator as well. Does that mean I would not be able to "share" a Company model between two different controller namespaces, say Admin::CompanyController and Guest::CompanyController? Best regards, Mauricio --- Mauricio L. Sadicoff muxico73-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org "Peace of mind isn''t at all superficial, really," I expound. "It''s the whole thing. That which produces it is good maintenance; that which disturbs it is poor maintenance. What we call workability of the machine is just an objectification of this peace of mind. The ultimate test is always your own serenity." - Zen and the Art of Motorcycle Maintenance. On May 30, 2007, at 20:14, kristersaurus wrote:> > thanks, thats very helpful. one more question: what address does this > get mapped to? ../admin/companies doesn''t seem to work...? > > On May 30, 6:54 am, Jean-Etienne Durand <rails-mailing-l...@andreas- > s.net> wrote: >> Hi, >> >> Just: script/generate model controlelr admin::companies >> And that is was! >> >> It will create a controller named CompanyController in a subdir named >> admin. From the ruby point of view, CompanyController belongs to >> admin >> namespace (class Admin::CompanyController) >> >> Regards, >> Jean-Etiennehttp://www.woa.hu >> >> -- >> 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 groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---