Created
March 4, 2015 06:26
-
-
Save onesup/036788f21fd6c43412e8 to your computer and use it in GitHub Desktop.
image serve on rails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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