Hi all, I have started making a site in ruby/rails and just wondering how to set the page for the root/ dir of the site as i have got the other pages done ie:- example/dir1 example/dir2 example/dir3 example/dir4 but just wondering how to set the example/ page as it always appears as the welcome to ruby page any help will be great thanks paul -- 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 -~----------~----~----~----~------~----~------~--~---
On Mon, Mar 2, 2009 at 11:28 PM, Paul Na <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have started making a site in ruby/rails and just wondering how to > set the page for the root/ dir of the site as i have got the other pages > done ie:- > > example/dir1 > example/dir2 > example/dir3 > example/dir4 > > but just wondering how to set the example/ page as it always appears as > the welcome to ruby pageI see 2 steps: 1) move the /public/index.html file to another name (e.g. $mv index.html index.html.ORIG) 2) add a route for ''/'' in config/routes.rb in the config/routes.rb near the the bottom of the file, but before the default routes, do something along the lines of map.connect( '''', :controller=>''home'') if you have a app/controllers/home_controller.rb HTH, Peter --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter Vandenabeele wrote:> On Mon, Mar 2, 2009 at 11:28 PM, Paul Na > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> the welcome to ruby page > I see 2 steps: > > 1) move the /public/index.html file to another name (e.g. $mv > index.html index.html.ORIG) > > 2) add a route for ''/'' in config/routes.rb > > in the config/routes.rb near the the bottom of the file, but before > the default routes, > do something along the lines of > > map.connect( '''', :controller=>''home'') > > if you have a app/controllers/home_controller.rb > > HTH, > > PeterHi peter thanks for that, thats helped alot thanks again -- 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 -~----------~----~----~----~------~----~------~--~---