Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def download
- send_file ("#{Rails.root}/public/images/image.jpg")
- end
- def download
- send_file ("#{Rails.root}/assets/images/image.jpg")
- end
- def download
- send_file ("#{Rails.root}/images/image.jpg")
- end
- def download
- send_file ("/public/images/image.jpg")
- end
- def download
- send_file ("/assets/public/images/image.jpg")
- end
- def download
- send_file ("/assets/images/image.jpg")
- end
- ActionController::MissingFile in HomeController#download
- Cannot read file 'some_path'
- IMAGES_PATH = File.join(Rails.root, "public", "images")
- def download
- send_file(File.join(IMAGES_PATH, "image.jpg"))
- end
- send_file(Rails.root.join('app' , 'assets', 'images', 'image.jpg'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement