Ruby on Rails
Friday, March 8, 2019
On Friday, 8 March 2019 12:41:34 UTC, Colin Law wrote:
Have you got a controller called WelcomeController? If not then what
is the name of the controller with method index?
Colin
You understand that there's a controller I'm trying to reference but that's about it.
I don't think you've understood my question, or the wording of my question, or know what the WelcomeController is.
I don't mean to sound patronizing and I know you're trying to help, but you don't understand. I'm going to break this down as much as I can.
I said in the first sentence "Is it possible to reference welcome#index, in the routes file?"
That means there's a thing called the WelcomeController , I didn't create it, otherwise I wouldn't have said it like that. And ti's not just a controller that happens to be called that, otherwise again, I wouldn't have phrased my question as I did.
You don't seem to be aware of what WelcomeController is.
I even said
"welcome page (That 'yay' page rails shows)."
Do you know what I'm referring to now?
If not,
Try creating a blank rails program..
do the commands
$ rails new blah
$ cd blah
$ rails s
Now read what it says in the console
It says WelcomeController
I didn't make that
You'll have it on your computer too.
Is my question clear to you now?
Also you were trying to tell me that the routes file has a root in there explicitly by default. No it does not. All you have to do is create a blank rails program and look at the routes file and you'll see it does not. So I don't understand why you say that?!
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
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+unsubscribe@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/c3645e84-44be-49d3-b6fb-0e8228bd9f81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment