I’m using send_data to retrieve binary (images) from the database.
It works fine, this is my controller :
@picture = Picture.find(params[:id])
@image = @picture.image_file
send_data (@image, :type => @picture.image_content_type, :filename =>
@picture.image_file_name, :disposition => ‘inline’)
However, when a user navigates to that action, all it shows is a
there a way to render the* layout *as well, and have the send_data put
picture in a layout? instead of just displaying a picture?
ie Could I have the send_data place it in the <%= yield %> ?