Class: IntegrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- IntegrationGenerator
- Defined in:
- lib/generators/integration/integration_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_templates ⇒ Object
4 5 6 7 8 9 |
# File 'lib/generators/integration/integration_generator.rb', line 4 def copy_templates template "model.rb.tt", "app/models/#{file_path}.rb" template "_form_options.html.erb.tt", "app/views/#{file_path}/_form_options.html.erb" template "_show_options.html.erb.tt", "app/views/#{file_path}/_show_options.html.erb" template "test.rb.tt", "test/models/#{file_path}_test.rb" end |
#inject_locales ⇒ Object
11 12 13 14 |
# File 'lib/generators/integration/integration_generator.rb', line 11 def inject_locales puts "IMPORTANT (1): Ensure you add your translations to config/locales/en.yml" puts "IMPORTANT (2): Ensure you add your test fixtures to test/fixtures/pager_tree/integration/integrations.yml" end |