hi all (newbie here) what is the best way to create a dynamic root to your ROR application, i.e. to the address: http://localhost:3000. By default this is created in the public folder as a html page. I was wondering whether I should delete this page and create a new one in the app, and if this is the case how do i configure the controller and view to display this page? -- 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 -~----------~----~----~----~------~----~------~--~---
Hi, you can easily edit the index.html located in your RoR app''s public folder. Good luck, -Conrad On 2/10/07, Marc Rice <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > hi all (newbie here) > > what is the best way to create a dynamic root to your ROR application, > i.e. to the address: http://localhost:3000. By default this is created > in the public folder as a html page. > > I was wondering whether I should delete this page and create a new one > in the app, and if this is the case how do i configure the controller > and view to display this page? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Just add an index action on whatever controller you''re using to serve up whatever. [Specific, huh?] Add a route like so... map.index "/", :controller => [your controller], :action => "index" It''s that simple. If it doesn''t fit in neatly with any of your other controllers, you might want to just plop that index method into ApplicationController. Just make sure the routing directs the base path to the right controller and method. No need to rely on a static page. RSL On 2/10/07, Marc Rice <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > hi all (newbie here) > > what is the best way to create a dynamic root to your ROR application, > i.e. to the address: http://localhost:3000. By default this is created > in the public folder as a html page. > > I was wondering whether I should delete this page and create a new one > in the app, and if this is the case how do i configure the controller > and view to display this page? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Russell Norris wrote:> Just add an index action on whatever controller you''re using to serve up > whatever. [Specific, huh?] Add a route like so... > > map.index "/", :controller => [your controller], :action => "index" > > It''s that simple. If it doesn''t fit in neatly with any of your other > controllers, you might want to just plop that index method into > ApplicationController. Just make sure the routing directs the base path > to the right controller and method. No need to rely on a static page. > > RSLYes, just edit config/routes.rb and it''s written right there in the comments. -- Chris Martin Web Developer http://chriscodes.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 -~----------~----~----~----~------~----~------~--~---