Thanks to the kind members of this forum, I''ve been able to place my scaffolds under an "admin" subdirectory 1.http://sitename - http://sitename/admin/scaffold_name Yet, I''m wondering if its possible to do the following: http://sitename/admin/ -- 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 -~----------~----~----~----~------~----~------~--~---
1st post not completed ===================== Thanks to the kind members of this forum, I''ve been able to place my scaffolds under an "admin" subdirectory (2.) 1. http://sitename 2. http://sitename/admin/scaffold_name Yet, I''m wondering if its possible to do the following (3.) and have it take me to an admin "homepage"... just an .rhtml page where a user can select between the different scaffolds. 3. http://sitename/admin/ When I try now, I get a routing error because no admin_controller.rb is specified in the root controller directory. And, if I add it, I can no longer use the (2.) method, because it doesn''t route the scaffolds properly. Any ideas? Thank You, -- 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 -~----------~----~----~----~------~----~------~--~---
This may be totaly wrong but I have seen code where you have something like Admin::Controller < ApplicationController index end main end end In this case the controller acts as a controller for the Admin module so the index page will be automatically loaded when you use: http://sitename/admin and the main page will be shown using this URL http://sitename/admin/main -- 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 -~----------~----~----~----~------~----~------~--~---
RJ wrote:> This may be totaly wrong but I have seen code where you have something > like > > Admin::Controller < ApplicationController > > index > end > > main > end > end > > In this case the controller acts as a controller for the Admin module so > the index page will be automatically loaded when you use: > > http://sitename/admin > > and the main page will be shown using this URL > > http://sitename/admin/mainAnd I am an idiot as I didn''t read your post correctly and you pointed out that this broke (2)... -- 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 -~----------~----~----~----~------~----~------~--~---
On 3 October 2006 04:00, Ryan wrote:> Yet, I''m wondering if its possible to do the following (3.) and have it > take me to an admin "homepage"... just an .rhtml page where a user can > select between the different scaffolds. > > 3. http://sitename/admin/ > > When I try now, I get a routing error because no admin_controller.rb is > specified in the root controller directory. And, if I add it, I can no > longer use the (2.) method, because it doesn''t route the scaffolds > properly. > > Any ideas?Make Admin::MainController and user routes to connect ''/admin/'' to this controller: map.connect ''/admin/:controller/:action/:id'' map.connect ''/admin'', :controller => ''/admin/main'' Caution, this will work only for one action (in the example - ''index''). But I guess this will be sufficient for your case. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---