Class: JqueryPictureTag::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/jquery_picture_tag/install/install_generator.rb,
lib/generators/jquery_picture_tag/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_jquery_picture_tagObject



11
12
13
14
# File 'lib/generators/jquery_picture_tag/install/install_generator.rb', line 11

def copy_jquery_picture_tag
  say_status "copying", "jQuery Picture Tag #{JqueryPictureTag::Rails::VERSION}", :green
  copy_file "jquery-picture-tag-#{JqueryPictureTag::Rails::VERSION}.js", "public/javascripts/jquery-picture-tag.js"
end

#do_nothingObject



25
26
27
28
29
30
31
# File 'lib/generators/jquery_picture_tag/install/install_generator.rb', line 25

def do_nothing
  say_status("deprecated", "You are using Rails 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 jquery-picture-tag-#{JqueryPictureTag::Rails::VERSION}` to your app/assets/javascripts/application.js")
  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