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?
Try this ,
rails g scaffold_controller controller_name
You will find more options via
rails generate -h
For scaffold with only 'name' column:
rails g scaffold User name --skip
Just add some columns.
Look to rails g scaffold -h
output for additional information.
If you want just controller and views without the whole scaffold you can do:
rails generate controller Users index show
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With