Skip to content

Instantly share code, notes, and snippets.

@onesup
Created March 4, 2015 06:26
image serve on rails.
def test
item = OrderItem.last
image = item.rop
send_file image.path, type: 'image/jpeg', disposition: 'inline'
end
#image.path looks like '/Users/onesup/projects/project-a/public/images/image_name.jpg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment