Class: ActiveScaffoldAssets

Inherits:
Object show all
Defined in:
lib/active_scaffold_assets.rb

Class Method Summary collapse

Class Method Details

.copy_to_public(from, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/active_scaffold_assets.rb', line 3

def self.copy_to_public(from, options = {})
  unless defined?(ACTIVE_SCAFFOLD_INSTALL_ASSETS) && ACTIVE_SCAFFOLD_INSTALL_ASSETS == false
    copy_files("/public", "/public", from)
    available_frontends = Dir[File.join(from, 'frontends', '*')].collect { |d| File.basename d }
    [:stylesheets, :javascripts, :images].each do |asset_type|
      copy_asset_type(from, available_frontends, asset_type, options)
    end
  end
end