Permalink
Browse files

Pull back in asset_path

  • Loading branch information...
1 parent b5ac04a commit 5b300a9ea40211a899882bfc12cb90bce1f41685 @wycats wycats committed Jun 2, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -12,6 +12,12 @@ def asset_paths
end
end
+ def asset_path(source, default_ext = nil, body = false)
+ source = source.logical_path if source.respond_to?(:logical_path)
+ path = asset_paths.compute_public_path(source, 'assets', default_ext, true)
+ body ? "#{path}?body=1" : path
+ end
+
def javascript_include_tag(source, options = {})
debug = options.key?(:debug) ? options.delete(:debug) : debug_assets?
body = options.key?(:body) ? options.delete(:body) : false

0 comments on commit 5b300a9

Please sign in to comment.