Class: EnjuEvent::SetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/enju_event/setup/setup_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_setup_filesObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/enju_event/setup/setup_generator.rb', line 4

def copy_setup_files
  directory("db/fixtures", "db/fixtures/enju_event")
  rake("enju_event_engine:install:migrations")
  inject_into_file 'app/controllers/application_controller.rb',
    "  include EnjuEvent::Controller\n", after: "include EnjuLibrary::Controller\n"
  inject_into_file 'app/assets/stylesheets/application.css',
    " *= require enju_event/application\n", after: " *= require enju_leaf\n"
  inject_into_file 'app/assets/javascripts/application.js',
    "//= require enju_event/application\n", after: "//= require enju_leaf\n"
end