Class: Atwho::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Atwho::Generators::InstallGenerator
- Defined in:
- lib/generators/atwho/install_generator.rb,
lib/generators/atwho/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_css ⇒ Object
20 21 22 23 24 |
# File 'lib/generators/atwho/install_generator.rb', line 20 def copy_css say_status("copying css"," jquery.atwho.css",:green) copy_file "stylesheets/jquery.atwho.css", "public/stylesheets/jquery.atwho.css" #copy_file "stylesheets/jquery.atwho.min.css", "public/stylesheets/jquery.atwho.min.css" end |
#copy_js ⇒ Object
13 14 15 16 17 18 |
# File 'lib/generators/atwho/install_generator.rb', line 13 def copy_js say_status("copying js", " jquery.atwho.js (#{Jquery::Atwho::Rails::VERSION})", :green) copy_file "javascripts/jquery.atwho/jquery.caret.js", "public/javascripts/jquery.atwho/jquery.caret.js" copy_file "javascripts/jquery.atwho/jquery.atwho.js", "public/javascripts/jquery.atwho/jquery.atwho.js" #copy_file "javascripts/jquery.atwho.min.js", "public/javascripts/jquery.atwho.min.js" end |
#do_nothing ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/generators/atwho/install_generator.rb', line 34 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 jquery.atwho` to your app/assets/javascripts/application.js and app/assets/stylesheets/application.css") say_status("", "If you upgraded your app from Rails 3.0 and still have jquery.atwho.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 |