globalize/globalize — pull request #349 by tomasz-jasiulek (2014-05-20 07:31:02+00:00)
Title: Fixed Carrierwave(probably other gems too) integration issue

Hey guys,

Recently I have tried to integrate carrierwave with globalize and faced a problem when trying to translate fields with mounted Carrierwave Uploader. The uploader is not triggered when saving the object, so I have decided to look deeper into globalize gem. It looks like AR Adapter is operating on too low api level when assigning translated values. Assigining via
``` ruby
attrs.each { |name, value| translation[name] = value }
```
skips Carrierwave(and probably other gems) uploader behavior. I have written fix for this, which uses accessor methods for assignment rather than low level hash assignment. Now everything works fine and do not need any hacking around.