You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key part is small_file: ->(p){p.url(:small)}. Since URL is actually computed based on the product_id and the size of the image (:small), Saving the file_name itself won't work.
It would be great if mongoid_alize would take a proc object and eval it on save.
Thoughts?
The text was updated successfully, but these errors were encountered:
I'm trying to cache a URL for an image of my
product
in myproject_products
modelSo I'm trying something like this:
The key part is
small_file: ->(p){p.url(:small)}
. Since URL is actually computed based on theproduct_id
and the size of the image (:small), Saving thefile_name
itself won't work.It would be great if
mongoid_alize
would take a proc object and eval it on save.Thoughts?
The text was updated successfully, but these errors were encountered: