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

  1. li>
  2. generate a script / model product
  3. rake db: migrate
  4. To add modified products_controller.rb: DEF Index () {@products = Product.all}
  5. (Error: uninitialized Continuous Product Controller :: Product)
  6. 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

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -