Class: SurveyorGui::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/surveyor_gui/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#assetsObject



30
31
32
33
34
# File 'lib/generators/surveyor_gui/install_generator.rb', line 30

def assets
  directory "app/assets"
  directory "app/models"
  directory "app/views"
end

#configurationsObject



21
22
23
24
# File 'lib/generators/surveyor_gui/install_generator.rb', line 21

def configurations
  replace_simple_forms_configuration_rb
  add_i18n_enforce_locales
end

#dependenciesObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/surveyor_gui/install_generator.rb', line 10

def dependencies
  generate "simple_form:install"
  generate "surveyor:install"
  rake "db:migrate db:test:prepare"
  rake "highcharts:update"
  unless options[:skip_migration]
    rake 'railties:install:migrations'
  end
  rake "db:migrate db:test:prepare"
end

#routesObject



26
27
28
# File 'lib/generators/surveyor_gui/install_generator.rb', line 26

def routes
  route('mount SurveyorGui::Engine => "/surveyor_gui", :as => "surveyor_gui"')
end