class CacheableFlash::InstallGenerator

Copies javascript libraries flash.js and js.cookie.js to public/javascripts/ (Rails 3.0.X only, Rails 3.1 has asset pipeline)

@example

$ rails generate cacheable_flash:install

Public Instance Methods

copy_files() click to toggle source
# 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