Closed angelic closed 13 years ago
Thanks for this patch angelic: you saved my day ;-)
argh... thanks for confirmation of my own findings
functionally equivalent patch in: http://github.com/sbfaulkner/paperclip/commit/b33f1c10a09dd680e8d65e2d73dcbf9c794cb757
and a test in: http://github.com/sbfaulkner/paperclip/commit/cf5bc5ec81eb76912deb7a522c4649125caddb5e
I was going mad trying to figure out why my :geometry was missing after reloading my classes (something very common on development).
I have defined my styles hash in a constant in a initializer, and I use it for several attachment models. After sending an attachment to one of them, the rest where not getting the :geometry value.
My external solution (not patching Paperclip, I mean) is to create a method that returns the literal hash, instead of a constant. It works for me without problems.
Correction: my alternative fix doesn't work in production.
This has been fixed in 56d6b2402d553a505f29eaeb022d4a6900fda8fa. :)
This causes problems so later instances of the same object aren't able to initialize with those keys. This affects :geometry, :format, and :processors.
Fix is here: angelic/paperclip@ec63aca937568005f0534fd6be90c051b8c316da Branch: http://github.com/angelic/paperclip/tree/issue_137