Forum: Rails I18n Globalize with uppercase locale attribute

Posted by Mattia nil (michx)
on 2012-11-23 10:38
Attachment: event_i18n.png (8,5 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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.