I am trying to make a png file in a controller in Rails3. I use:
render :file=>'public/images/filename.png'
However, the output does not seem to be a PNG file (its contents begin with “PNG” - checked with curl — but it is not a valid file). I can not find the rendering documentation: file in Rails3. Has the syntax changed for this? Even if this is a MIME type problem, I think I should get a swirl file.
I use this technique to display the default image when using Fleximage images, if available. Fleximage images work correctly, but this simple operation does not work.
source
share