Skip to content

Instantly share code, notes, and snippets.

@chsh
Created March 10, 2012 14:43
Show Gist options
  • Save chsh/2011623 to your computer and use it in GitHub Desktop.
Save chsh/2011623 to your computer and use it in GitHub Desktop.
audio_tag does not generate correct path to assets in production. (Rails 3.2.2)
module ApplicationHelper
def audio_tag(source, options = {})
options.symbolize_keys!
# originally defined as audio_path(source) but it doesn't work...
options[:src] = path_to_asset(source)
tag("audio", options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment