Class: FormCutter::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FormCutter::Generators::InstallGenerator
- Defined in:
- lib/generators/form_cutter/install_generator.rb
Instance Method Summary collapse
- #copy_initializers ⇒ Object
- #copy_locale_file ⇒ Object
- #copy_scaffold_template ⇒ Object
- #copy_templates ⇒ Object
Instance Method Details
#copy_initializers ⇒ Object
8 9 10 |
# File 'lib/generators/form_cutter/install_generator.rb', line 8 def copy_initializers copy_file 'form_cutter.rb', 'config/initializers/form_cutter.rb' end |
#copy_locale_file ⇒ Object
16 17 18 |
# File 'lib/generators/form_cutter/install_generator.rb', line 16 def copy_locale_file copy_file 'en.yml', 'config/locales/form_cutter.en.yml' end |
#copy_scaffold_template ⇒ Object
20 21 22 23 |
# File 'lib/generators/form_cutter/install_generator.rb', line 20 def copy_scaffold_template engine = [:template_engine] copy_file "_form.html.#{engine}", "lib/templates/#{engine}/scaffold/_form.html.#{engine}" end |
#copy_templates ⇒ Object
12 13 14 |
# File 'lib/generators/form_cutter/install_generator.rb', line 12 def copy_templates copy_file 'default.html.erb', 'app/views/forms/default.html.erb' end |