Sha256: aeff026e271314371d6f6c70557b441c3476c22c33c5ac23422ecf3f0b817339
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# TODO: # * find a mechanism to do this without monkey-patching Rails # * add an autoload option to load all from plugins, or similar # * allow engines to indicate (automatically when #register is called?) # which assets to include. # module ActionView::Helpers::AssetTagHelper # # def expand_javascript_sources_with_engine_assets(sources, recursive = false) # # if sources.include?(:all) # # result = (determine_source(:defaults, @@javascript_expansions).dup | expand_javascript_sources_without_engine_assets(sources, recursive)) # # result.map! { |entry| entry =~ /\.js$/ ? entry : "#{entry}.js" } # # return result.uniq # # else # # raise NotImplementedError # # end # # end # # alias_method_chain :expand_javascript_sources, :engine_assets # # # def asset_file_path_with_engine_assets(path) # primary = asset_file_path_without_engine_assets(path) # return primary if File.exist?(primary) # # EngineAssets::PublicLocator.locate(path) # end # alias_method_chain :asset_file_path, :engine_assets # end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
engine-assets-0.6.0.pre1 | lib/engine_assets/extensions/rails/assets.rb |