Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3490

Fix Fields::Localized#lookup to work with boolean

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 5.1.6, 6.0.3
    • Affects Version/s: None
    • Component/s: None
    • None

      Fix this case:

      
      class Property
        include Mongoid::Document
      
        field :value, :localize => true
      end
      
      p = Property.new
      p.value_translations = { fr: false, en: "random" }
      p.save!
      
      I18n.locale = :fr
      p.value # returns "random" instead of false
      
      

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            abrisse abrisse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: