Class: CacheableFlash::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CacheableFlash::InstallGenerator
- Defined in:
- lib/generators/cacheable_flash/install/install_generator.rb
Overview
Copies javascript libraries flash.js and js.cookie.js to public/javascripts/ (Rails 3.0.X only, Rails 3.1 has asset pipeline)
Instance Method Summary collapse
Instance Method Details
#copy_files ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/generators/cacheable_flash/install/install_generator.rb', line 15 def copy_files # Also raise this deprecation in rails 4 if (::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1) || ::Rails::VERSION::MAJOR > 3 ActiveSupport::Deprecation.warn("Rails 3.1 has the asset pipeline, so you only need to copy javascript files if you aren't using it.") end template 'flash.js', 'public/javascripts/flash.js' template 'js.cookie.js', 'public/javascripts/js.cookie.js' end |