Class: EnjuInventory::SetupGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- EnjuInventory::SetupGenerator
- Defined in:
- lib/generators/enju_inventory/setup/setup_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_setup_files ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/enju_inventory/setup/setup_generator.rb', line 4 def copy_setup_files inject_into_file 'app/controllers/application_controller.rb', " include EnjuInventory::Controller\n", after: "EnjuLibrary::Controller\n" append_to_file("app/models/user.rb") do <<"EOS" Item.include(EnjuInventory::EnjuItem) EOS end end |