In a specific view, I am presenting an array of POROs created from an SQL query (this is for performance reasons, since ActiveRecord models here will be a serious performance issue).
In this view, I need to display an image loaded using paperclip, but cannot find a way to force Paperclip to return the URL of the image without an ActiveRecord instance (attachment). I can get the image name from the database ("image.jpg") and the model name ("User").
I will need something like url ("image.jpg" ,: user ,: thumb).
I could hardcode the paths, but I would rather not do this, and let paperclip handle it.
Is it possible?
Thanks Ricardo
source share