Forum: Rails I18n Globalize with uppercase locale attribute

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0d71c4fa966bcb49166a19d769910647?d=identicon&s=25 Mattia nil (michx)
on 2012-11-23 10:38
Attachment: event_i18n.png (8 KB)
I have this model:

    class Event
        translates :nome, :descrizione
        # other stuff

Inside the database I have defined the event_translations table with
locale field as enum('IT', 'EN')... The problem is that Globalize uses
lowercase locale, and build queries like this one:

SELECT * FROM `event_translations` WHERE (`event_translations`.`locale`
IN ('it')) AND (`event_translations`.event_id = 1406)

Instead of:

    SELECT * FROM `event_translations` WHERE
(`event_translations`.`locale` IN ('IT')) AND
(`event_translations`.event_id = 1406)

Can you help me?
Thanks in advance
This topic is locked and can not be replied to.