Is there a good admin generator for Ruby on Rails?

前端 未结 12 1588
小蘑菇
小蘑菇 2021-01-30 21:29

My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails.

12条回答
  •  爱一瞬间的悲伤
    2021-01-30 22:05

    The most common way to create a CRUD interface is to use Scaffold.

    ./script/generate scaffold_resource MyModel property:type property2:type2
    

    This command would generate a CRUD interface for the model named MyModel (singular) with two properties. Properties is what's called columns in DB lingo. So you could have name:string age:integer active:boolean etc.

提交回复
热议问题