Skip to content

Instantly share code, notes, and snippets.

@seanstickle
Created November 3, 2010 04:04
Show Gist options
  • Select an option

  • Save seanstickle/660785 to your computer and use it in GitHub Desktop.

Select an option

Save seanstickle/660785 to your computer and use it in GitHub Desktop.
controller:
def show
begin
asset = Attachment.find(params[:id]).asset
render :text => "#{asset.path} #{asset.content_type} #{asset.original_filename}"
rescue
session_redirect
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment