Class: EffectiveResources::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_application_templatesObject



12
13
14
15
16
# File 'lib/generators/effective_resources/install_generator.rb', line 12

def copy_application_templates
  [:edit, :index, :new, :show].each do |file|
    template ('../' * 3) + "app/views/application/#{file}.html.haml", "app/views/application/#{file}.html.haml"
  end
end

#copy_initializerObject



8
9
10
# File 'lib/generators/effective_resources/install_generator.rb', line 8

def copy_initializer
  template ('../' * 3) + 'config/effective_resources.rb', 'config/initializers/effective_resources.rb'
end