Is there a way to generate a rails scaffold without the views, there has to be a better way then generating the scaffold and deleting the views and the view specs.
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- Is there a way to remove IDV Tags from an AIFF fil
- Rails how to handle error and exceptions in model
相关文章
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
You can use
rails g resource Foo bar:text
Not sure why these answers create the resource first when you can just generate the entire scaffold without the views but still get your controller methods and model.
If you would like to have the controllers generated in the normal fashion, try this:
The first command generates the model and the second one uses the generated model to create the controller which includes the RESTful actions.
--skip-template-engine
causes the views to be omitted.