On Friday, 8 March 2019 12:07:16 UTC, Colin Law wrote: > > > You can reference any controller/action in the routes. Welcome#index > is no different to any other. Reference it exactly the same way as > you would reference any controller#action. >
Would be all lowercase. (as with all controllers , they have an uppercase letter in some parts of rails, but in the config/routes.rb file they are all lowercase) I have tried get '/abc', to:'welcome#index' or root 'welcome#index' And doesn't work. I get uninitialized constant WelcomeController > Also are you sure the routes file was empty initially? Was there not > a 'root:' element? > > no root element there explicitly by default.. if you do rails new blah1 it makes a routes file, not completely blank 'cos has Rails.application.routes.draw do followed by some comment, and then end. No routes in there by default. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5dbcd78b-84c1-415a-96e0-1921397ecfb5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.