Module: Presenting
- Defined in:
- lib/presenting.rb,
lib/presenting/engine.rb,
lib/presenting/search.rb,
lib/presenting/helpers.rb,
lib/presenting/sorting.rb,
lib/presenting/attribute.rb,
lib/presenting/configurable.rb
Defined Under Namespace
Modules: Configurable, Defaults, FormHelpers, Helpers, Sanitize Classes: Attribute, Engine, FieldSet, Search, Sorting, View
Class Method Summary collapse
-
.precache! ⇒ Object
copies all assets into the application’s public directory public/stylesheets/presenting and public/javascripts/presenting.
Class Method Details
.precache! ⇒ Object
copies all assets into the application’s public directory public/stylesheets/presenting and public/javascripts/presenting
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/presenting.rb', line 19 def self.precache! presenting_dir = File.join(File.dirname(__FILE__), '../') # gross %w(stylesheets javascripts).each do |asset_type| source_dir = File.join(presenting_dir, 'app', 'assets', asset_type, 'presenting') target_dir = File.join(Rails.application.paths["public/#{asset_type}"].first, 'presenting') FileUtils.mkdir_p(target_dir) Dir[File.join(source_dir, '*')].each do |asset| FileUtils.cp(asset, File.join(target_dir, File.basename(asset))) end end end |