Sha256: a156774d33b034a2cf56c8bdf03764d2fe8e20a2ee82214d35b35c729e61fe0f
Contents?: true
Size: 761 Bytes
Versions: 3
Compression:
Stored size: 761 Bytes
Contents
require 'fileutils' class ArtworkAssetsGenerator < Rails::Generator::Base def manifest record do |m| has_assets = begin Rails.configuration.assets rescue nil end if has_assets puts <<-MESSAGE The version of Rails you're using (#{Rails.version}) supports the asset pipeline and the required assets will be automatically available for your app. You just need to require them in your manifest files. See how in the readme. MESSAGE else assets_root = File.expand_path('../../../lib/assets', __FILE__) FileUtils.cp_r Dir.glob("#{assets_root}/*"), Rails.root.join('public'), :verbose => true puts 'Done.' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
artwork-0.1.1 | generators/artwork/artwork_assets_generator.rb |
artwork-0.1.0 | generators/artwork/artwork_assets_generator.rb |
artwork-0.0.1 | generators/artwork/artwork_assets_generator.rb |