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

Fix for validates_uniqueness with aliased fields

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.4
    • Affects Version/s: None
    • Component/s: None
    • None

      (Squashed commits from previous PR MONGOID-2988)

      I discovered that the below does not work, it yields a false positive :warning:

      field :n, as: :name, type: String
      
      validates_uniqueness_of :name
      

      I've patched this behavior and have added specs for it.

      Also includes a trivial commit to add Rubymine (.idea) to .gitignore

            Assignee:
            durran Durran Jordan
            Reporter:
            johnnyshields Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: