svenfuchs/globalize3 — pull request #103 by inukshuk (2012-02-07 10:54:46+00:00)
Title: return nil if locale is not set

First off, thanks for globalize3!

For some reason (I have yet to investigate, but it may have to do with a server restart during a transaction) we managed to create a translation through active admin that did not have a locale set. This lead to an exception when using active admins index scaffolds that is difficult to handle. If the locale reader in translation did not raise an exception, but returned a benign good value (nil in this case) it would be much easier to deal with this problem.

This is just a quick patch and there may be reasons why you would not want the locale reader to ever return nil. If that's the case, just let me know and I'll think of something else (alternatively, just tell me how you'd want to treat this issue). Thanks!