Created
May 19, 2015 07:52
-
-
Save reiro/aa8b223d6abe52633a35 to your computer and use it in GitHub Desktop.
Active admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'activeadmin', github: 'activeadmin' | |
gem 'devise' | |
gem 'cancan' # or cancancan | |
gem 'draper' | |
gem 'pundit' | |
rails g scaffold Product name price:decimal category:references | |
rails g scaffold Category name | |
rake db:migrate | |
Category.create name: "Книги" | |
Category.create name: "Видео игры" | |
Category.create name: "Диски" | |
Product.create name: "Programming Ruby", price: 13.92, category_id: 1 | |
Product.create name: "Властелин колец", price: 20.22, category_id: 1 | |
Product.create name: "Programming Rails4", price: 3.52, category_id: 1 | |
Product.create name: "Fallout", price: 15.00, category_id: 2 | |
Product.create name: "Generals", price: 12.55, category_id: 2 | |
Product.create name: "Gotica", price: 9.99, category_id: 2 | |
Product.create name: "Хиты 90", price: 5.92, category_id: 3 | |
Product.create name: "Хиты 80", price: 4.22, category_id: 3 | |
Product.create name: "Руки вверх", price: 2.52, category_id: 3 | |
rails g active_admin:install | |
rake db:migrate | |
rails g active_admin:resource Product |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment