Class: Jquery::Gmap3::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_gmap3Object



13
14
15
16
17
# File 'lib/generators/jquery/gmap3/install/install_generator.rb', line 13

def copy_gmap3
  say_status("copying", "GMAP3 Plugin for jQuery (#{Jquery::Gmap3::Rails::JQUERY_GMAP3_VERSION})", :green)
  copy_file "gmap3.js", "public/javascripts/gmap3.js"
  copy_file "gmap3.min.js", "public/javascripts/gmap3.min.js"
end

#do_nothingObject



30
31
32
33
34
35
36
# File 'lib/generators/jquery/gmap3/install/install_generator.rb', line 30

def do_nothing
  say_status("deprecated", "You are using Rails #{::Rails.version} 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 gmap3` to your app/assets/javascripts/application.js")
  say_status("", "If you upgraded your app from Rails 3.0 and still have gmap3.js in your javascripts, be sure to remove it.")
  say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
end