Class: ShowFor::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_generator_templateObject


16
17
18
19
# File 'lib/generators/show_for/install_generator.rb', line 16

def copy_generator_template
  engine = options[:template_engine]
  copy_file "show.html.#{engine}", "lib/templates/#{engine}/scaffold/show.html.#{engine}"
end

#copy_initializersObject


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

def copy_initializers
  copy_file 'show_for.rb', 'config/initializers/show_for.rb'
end

#copy_locale_fileObject


12
13
14
# File 'lib/generators/show_for/install_generator.rb', line 12

def copy_locale_file
  copy_file 'en.yml', 'config/locales/show_for.en.yml'
end