Class: Custerd::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Custerd::Generators::InstallGenerator
- Defined in:
- lib/generators/custerd/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer ⇒ Object
12 13 14 |
# File 'lib/generators/custerd/install_generator.rb', line 12 def copy_initializer copy_file 'initializer.rb', 'config/initializers/custerd.rb' end |
#copy_javascript_asset ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/generators/custerd/install_generator.rb', line 16 def copy_javascript_asset if Rails.version >= '3.1' copy_file '../../../../vendor/assets/javascripts/custerd.js', 'vendor/assets/javascripts/custerd.js' else copy_file '../../../../vendor/assets/javascripts/custerd.js', 'public/javascripts/custerd.js' end end |
#show_readme ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/generators/custerd/install_generator.rb', line 24 def show_readme if Rails.version >= '3.1' readme 'README.rails.3.1' if behavior == :invoke else readme 'README.rails.3.0' if behavior == :invoke end end |