Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. def download
  2. send_file ("#{Rails.root}/public/images/image.jpg")
  3. end
  4.  
  5. def download
  6. send_file ("#{Rails.root}/assets/images/image.jpg")
  7. end
  8.  
  9. def download
  10. send_file ("#{Rails.root}/images/image.jpg")
  11. end
  12.  
  13. def download
  14. send_file ("/public/images/image.jpg")
  15. end
  16.  
  17. def download
  18. send_file ("/assets/public/images/image.jpg")
  19. end
  20.  
  21. def download
  22. send_file ("/assets/images/image.jpg")
  23. end
  24.  
  25. ActionController::MissingFile in HomeController#download
  26. Cannot read file 'some_path'
  27.  
  28. IMAGES_PATH = File.join(Rails.root, "public", "images")
  29.  
  30. def download
  31. send_file(File.join(IMAGES_PATH, "image.jpg"))
  32. end
  33.  
  34. send_file(Rails.root.join('app' , 'assets', 'images', 'image.jpg'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement