Forum: Rails I18n Globalize with uppercase locale attribute

0d71c4fa966bcb49166a19d769910647?d=identicon&s=25 Mattia nil (michx)
on 2012-11-23 10:38
Attachment: event_i18n.png (8 KB)
Hi,
I have this model:

    class Event
        translates :nome, :descrizione
        # other stuff
    end


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.