How can I make scaffold only for controller and views if model already exists?

MKK picture MKK · Jul 26, 2012 · Viewed 36.5k times · Source

I already have set up Devise to My App.
So User model is already generated, and exists by installing Devise

Now I'd like to add my own controller users_controller.rb and its views index and show.
How can I make scaffold without affecting to User model that already exists?

Answer

RailsEnthusiast picture RailsEnthusiast · Apr 16, 2013

Try this ,

rails g scaffold_controller controller_name 

You will find more options via

rails generate -h