ruby on rails - Trying to manually recreate a simple generate/scaffolding script -
I am trying to understand the railroad from the ground. I want to learn how to manually prepare the original show-all / show-singles / CRUD functionality in the framework.
I am currently working on display-all the functionality, but when I try
- li>
- generate a script / model product
- rake db: migrate
- To add modified products_controller.rb: DEF Index () {@products = Product.all}
- (Error: uninitialized Continuous Product Controller :: Product)
- Ideally, dump to see all orders
What is the fix?
when you make your model
then script / model product Generate
or Script / Model Product /
In summary, a model product stays in a PP / Model / Product. Uses RB and database table products. When you have a multi-word model named like an order item like an app / model / order_item and uses a database table called order_it, your basic question also does not show any columns when the model generator is running, I agree I have left them in short, otherwise you have a table with very few columns.
Comments
Post a Comment