Skip to content

Instantly share code, notes, and snippets.

@DavidQL
Created August 24, 2011 17:45
Show Gist options
  • Save DavidQL/1168648 to your computer and use it in GitHub Desktop.
Save DavidQL/1168648 to your computer and use it in GitHub Desktop.
def redirect_asset_to_S3
resource = params[:other].join('/')
@url = AWS::S3::S3Object.url_for('assets/'+resource, ENV['S3_BUCKET'])
redirect_to @url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment