Class: RailsDevtools::HostAppImagesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationController
- BaseController
- RailsDevtools::HostAppImagesController
- Defined in:
- app/controllers/rails_devtools/host_app_images_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/rails_devtools/host_app_images_controller.rb', line 5 def show return head :not_found unless image? image_path = find_source_image return head :not_found unless image_path mime_type = Mime::Type.lookup_by_extension(params[:format]) send_file image_path, type: mime_type, disposition: "inline" end |