Class: AjaxPagination::Generators::AssetsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AjaxPagination::Generators::AssetsGenerator
- Defined in:
- lib/generators/ajax_pagination/assets_generator.rb
Instance Method Summary collapse
Instance Method Details
#css ⇒ Object
28 29 30 |
# File 'lib/generators/ajax_pagination/assets_generator.rb', line 28 def css copy_file "lib/assets/stylesheets/ajax_pagination.css", "public/stylesheets/ajax_pagination.css" end |
#img ⇒ Object
31 32 33 |
# File 'lib/generators/ajax_pagination/assets_generator.rb', line 31 def img copy_file "lib/assets/images/ajax-loader.gif", "public/images/ajax-loader.gif" end |
#js ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/generators/ajax_pagination/assets_generator.rb', line 19 def js jstemplate = ERB.new IO.read(File.("../../../assets/javascripts/ajax_pagination.js.erb",__FILE__)) Dir.mkdir("public/javascripts") unless File.exists?("public/javascripts") create_file "public/javascripts/ajax_pagination.js", jstemplate.result(binding) copy_file "vendor/assets/javascripts/jquery.ba-bbq.js", "public/javascripts/jquery.ba-bbq.js" copy_file "vendor/assets/javascripts/jquery.url.js", "public/javascripts/jquery.url.js" end |