Hello I want to setup the welcome page as the default page. so, i added the last line belove to my config/routes.rb file but nothing changes. ActionController::Routing::Routes.draw do |map| map.connect '':controller/:action/:id.:format'' map.connect '':controller/:action/:id'' map.connect '''', :controller=>''main'', :action=>''welcome'' end it still do not open the main/welcome when i type "http://localhost:3000/". what''s the problem? Thanks. -- 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 -~----------~----~----~----~------~----~------~--~---
Bahadır Doğan wrote:> Hello > > I want to setup the welcome page as the default page. so, i added the > last line belove to my config/routes.rb file but nothing changes. > > > > ActionController::Routing::Routes.draw do |map| > > map.connect '':controller/:action/:id.:format'' > map.connect '':controller/:action/:id'' > map.connect '''', :controller=>''main'', :action=>''welcome'' > end > > > > it still do not open the main/welcome when i type > "http://localhost:3000/". what''s the problem? > > Thanks.two things: a) put map.connect '''', :controller=>''main'', :action=>''welcome'' on the top line b) remove the index.html file that is in pubic .. it may be overriding the route defined. (via the server which redirects there ; lighttpd / ngnix / what-ever-server ) -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thank you.that solved the problem. -- 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 -~----------~----~----~----~------~----~------~--~---