mongoid/mongoid — pull request #3011 by johnnyshields (2013-05-01 16:45:09+00:00)
Title: Fix for validates_uniqueness with aliased fields

(Squashed commits from previous PR #2988)

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

```ruby
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