rails g scaffold for existing model and DB table
-
25-05-2021 - |
Frage
I would like to create a structure with
rails g scaffold Article
, but I have already created the table Articles
and model Articles
.
Is there any way to do that?
Lösung
rails generate scaffold_controller Article
Andere Tipps
Use rails generate scaffold_controller Article
with parameters, example:
rails g scaffold_controller Article title:string body:text
Create views with attributes in tables
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow