Class: Neo4j::Rails::Validations::ExactMatchValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j/rails/validations/uniqueness.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) index_type



38
39
40
# File 'lib/neo4j/rails/validations/uniqueness.rb', line 38

def self.index_type
  :exact
end

+ (Object) match(rec, attribute, value)



46
47
48
# File 'lib/neo4j/rails/validations/uniqueness.rb', line 46

def self.match(rec,attribute,value)
  rec[attribute] == value
end

+ (Object) query(model, attribute, value)



42
43
44
# File 'lib/neo4j/rails/validations/uniqueness.rb', line 42

def self.query(model,attribute,value)
  model.all("#{attribute}: \"#{value}\"")
end