Class: OnTheSpot::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- OnTheSpot::Generators::InstallGenerator
- Defined in:
- lib/generators/on_the_spot/install/install_generator.rb
Instance Method Summary collapse
-
#copy_javascripts ⇒ Object
def download_jeditable # Downloading latest jEditable get “www.appelsiini.net/download/jquery.jeditable.js”, “public/javascripts/jquery.jeditable.mini.js” end.
- #copy_locales ⇒ Object
Instance Method Details
#copy_javascripts ⇒ Object
def download_jeditable
# Downloading latest jEditable
get "http://www.appelsiini.net/download/jquery.jeditable.js", "public/javascripts/jquery.jeditable.mini.js"
end
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/generators/on_the_spot/install/install_generator.rb', line 12 def copy_javascripts if ::Rails.version[0..2].to_f >= 3.1 #puts "The javascripts do not need to be installed since Rails 3.1" else copy_file "../../../../../app/assets/javascripts/on_the_spot_code.js", "public/javascripts/on_the_spot.js" copy_file "../../../../../app/assets/javascripts/jquery.jeditable.js", "public/javascripts/jquery.jeditable.js" copy_file "../../../../../app/assets/javascripts/jquery.jeditable.checkbox.js", "public/javascripts/jquery.jeditable.checkbox.js" copy_file "../../../../../app/assets/stylesheets/on_the_spot.css", "public/stylesheets/on_the_spot.css" end end |
#copy_locales ⇒ Object
23 24 25 26 |
# File 'lib/generators/on_the_spot/install/install_generator.rb', line 23 def copy_locales copy_file "on_the_spot.en.yml", "config/locales/on_the_spot.en.yml" copy_file "on_the_spot.fr.yml", "config/locales/on_the_spot.fr.yml" end |