Class: IndexFor::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- IndexFor::Generators::InstallGenerator
- Defined in:
- lib/generators/index_for/install_generator.rb
Instance Method Summary collapse
- #copy_generator_template ⇒ Object
- #copy_initializers ⇒ Object
- #copy_locale_file ⇒ Object
- #copy_wice_index_for_template ⇒ Object
Instance Method Details
#copy_generator_template ⇒ Object
21 22 23 24 25 |
# File 'lib/generators/index_for/install_generator.rb', line 21 def copy_generator_template engine = [:template_engine] copy_file "index.html.#{engine}", "lib/templates/#{engine}/scaffold/index.html.#{engine}" copy_file "show.html.#{engine}", "lib/templates/#{engine}/scaffold/show.html.#{engine}" end |
#copy_initializers ⇒ Object
13 14 15 |
# File 'lib/generators/index_for/install_generator.rb', line 13 def copy_initializers copy_file 'index_for.rb', 'config/initializers/index_for.rb' end |
#copy_locale_file ⇒ Object
17 18 19 |
# File 'lib/generators/index_for/install_generator.rb', line 17 def copy_locale_file copy_file 'en.yml', 'config/locales/index_for.en.yml' end |
#copy_wice_index_for_template ⇒ Object
8 9 10 11 |
# File 'lib/generators/index_for/install_generator.rb', line 8 def copy_wice_index_for_template engine = [:template_engine] copy_file "_wice_index_for.html.#{engine}", "app/views/index_for/_wice_index_for.html.#{engine}" end |