Class: Attack::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Attack::Generators::InstallGenerator
- Defined in:
- lib/generators/attack/install/install_generator.rb,
lib/generators/attack/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_attack ⇒ Object
12 13 14 15 16 |
# File 'lib/generators/attack/install/install_generator.rb', line 12 def copy_attack say_status("copying", "attack (#{Attack::Rails::ATTACK_VERSION})", :green) copy_file "attack.js", "public/javascripts/attack.js" copy_file "attack.min.js", "public/javascripts/attack.min.js" end |
#do_nothing ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/generators/attack/install/install_generator.rb', line 27 def do_nothing say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.") say_status("", "The necessary files are already in your asset pipeline.") say_status("", "Just add `//= require attack` to your app/assets/javascripts/application.js") say_status("", "If you upgraded your app from Rails 3.0 and still have attack.js, rails.js, or attack_ujs.js in your javascripts, be sure to remove them.") say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.") # ok, nothing end |