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

fix rails 4.2 deprecation warning in uniqueness validator

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Running mongoid/master against rails/master generates deprecation warnings on the uniqueness validator, as per:

      https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validator.rb#L129

      I've removed the setup, and used document.class.superclass to locate the appropriate scope for the uniqueness query to be run from. Specs are all still green. What have I missed?

            Assignee:
            durran Durran Jordan
            Reporter:
            leemhenson Lee Henson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: