andreasronge/neo4j — pull request #356 by JohnKellyFerguson (2014-06-07 19:54:28+00:00)
Title: Infer class from record in UniquenessValidator

I've been using neo4j in a Rails app and have wanted to use

```ruby
class Person
include Neo4j::ActiveNode

property :username, type: String
validates_uniqueness_of :username
end
```

I've set up the following spec:

```ruby
describe Person do
it 'validates uniqueness of username' do
original = create(:person)
expect(build(:person, username: original.username))
.to have(1).errors_on(:username)
end
end
```

Which fails with the following output: