You can create your own kinks.
Add this to your config/initializers/inflections.rb
ActiveSupport::Inflector.inflections do |inflect| inflect.plural "cafe", "cafes" end
(Reboot your server after making the changes. This is not required for the scaffolding command itself, but it is needed when you want to actually view / use the code)
Now, when you run rails g scaffold cafe
, you will get:
... app/views/cafes create app/views/cafes/index.html.erb create app/views/cafes/edit.html.erb create app/views/cafes/show.html.erb create app/views/cafes/new.html.erb create app/views/cafes/_form.html.erb etc
This may help you: http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-inflections
source share