Module: RailsConnector::CmsAccessible

Included in:
DefaultCmsController
Defined in:
lib/rails_connector/cms_accessible.rb

Instance Method Summary collapse

Instance Method Details

#deliver_fileObject (protected)

Deliver a binary @obj by redirecting to it's `body_data_url`. Will respond with 404 if the @obj has no blob.


22
23
24
25
26
27
28
# File 'lib/rails_connector/cms_accessible.rb', line 22

def deliver_file
  if @obj.body_data_url
    redirect_to enforce_protocol_from_request(@obj.body_data_url)
  else
    render text: "Empty Blob", status: 404
  end
end