I wonder how to create singleton controller in Rails 4.2.
For example rails g scaffold Dashboard
will generate dashboards_controller
witch in my case has no sense because I need only one Dashboard so dashboard_controller
is the thing I need.
I see there is an option -c
to specify controller name, however I bet there was something like --singleton
but is gone now.
So, the question is, should I use -c
to override controller name or the "new Rails way" is to create plural controllers names, like dashboards_controller
and then use router to point it to dashboard URL?