class Sprockets::AssetAttributes

def path_with_fingerprint(digest)


# => "foo-0aa2105d29558f3eb790d411d7d8fb66.js"
"foo.js"

Injects digest fingerprint into path.
def path_with_fingerprint(digest)
  if old_digest = path_fingerprint
    pathname.sub(old_digest, digest).to_s
  else
    pathname.to_s.sub(/\.(\w+)$/) { |ext| "-#{digest}#{ext}" }
  end
end