Reputation: 3
I'm new to rails and was trying out the scaffold command - the following scaffold runs and works when I view it via web brick
script/generate scaffold book title:string
the following fails - gives me a weird route error
script/generate scaffold application name:string
the following works
script/generate scaffold app name:string
can anyone shed some light on this? Is 'application' a reserved word?
Upvotes: 0
Views: 579
Reputation: 1997
Just so you know, make sure not to do this:
script/generate book title:string
You need to have the word scaffold after generate, like this:
script/generate scaffold book title:string
Upvotes: 0
Reputation: 950
All your controllers are subclasses of ApplicationController, created by Rails. you can't create another controller with this name.
Upvotes: 3
Reputation: 46914
Yes Application is a reserved word
You can see a complete list on the Wiki
http://wiki.rubyonrails.org/rails/pages/reservedwords
Upvotes: 3