Strange :id in :path with Mongoid-Paperclip — /4f8b/5a82/ef1a/7750/b800/0077/ -


i've upgraded rails 3.1.3 3.2.3 , noticed browser doesn't show images anymore. looked images path , /system/photos/images/4fce/1fb6/3ee5/1d01/a800/0006/original/img_2842new2.jpg?1338908598 example. there no :path declaration in model, should use default :rails_root/public/system/:attachment/:id/:style/:filename.

the key thing images aren't shown :id parameter 4fce1fb63ee51d01a8000006 stored in db devided slashes (/) 4-symbol groups: 4fce/1fb6/3ee5/1d01/a800/0006, folder named sould be, 4fce1fb63ee51d01a8000006. that's pretty strange.

i use

mongo (1.6.2)  mongoid (2.4.10)  paperclip (3.0.4)  mongoid-paperclip (0.0.7)  

it mistake, didn't notice when did updates paperclip updated , version 3.0 requires :path , :url options passed explicitly:

:path => ":rails_root/public/system/:attachment/:id/:style/:filename", :url => "/system/:attachment/:id/:style/:filename" 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -