How to create forests for a model that already exists

I already have a model. I just want to create some admin screens that will perform the function of adding / editing / updating / deleting.

My model name is User, and it has properties user_id, first_name, last_name, user_status, created_at, updated_at, updated_by

Is it possible to use script/generate scaffoldon this model so that crud functionality appears on its own, and then I can just make it look like the rest of the application.

I do not know if this matters, but the model useris related has_many throughto another table

+3
source share
2 answers

I believe you can use nifty_scaffold for this

+1

, + . ( 3):

rails generate controller Admin::Users

, , :

rails generate scaffold_controller Admin::Users
0

Source: https://habr.com/ru/post/1731132/


All Articles