Class: SimpleForm::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_initializersObject



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

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

#copy_locale_fileObject



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

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

#copy_scaffold_templateObject



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

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