Class: PowerShop::Generators::InstallGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- PowerShop::Generators::InstallGenerator
- Defined in:
- lib/generators/power_shop/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/generators/power_shop/install/install_generator.rb', line 8 def self.source_root @_power_shop_source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#setup_directory ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/power_shop/install/install_generator.rb', line 12 def setup_directory empty_directory "app/admin" template 'active_admin/category.rb.erb', 'app/admin/category.rb' template 'active_admin/product.rb.erb', 'app/admin/product.rb' end |