Skip to content

Instantly share code, notes, and snippets.

@wafiq
Created February 13, 2012 10:14
Show Gist options
  • Save wafiq/1815770 to your computer and use it in GitHub Desktop.
Save wafiq/1815770 to your computer and use it in GitHub Desktop.
Get image URL for Rails 3.1 Asset Pipeline
def image_url(image)
root_url[0..-2] + asset_path(image)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment