Class: Neo4j::Rails::Validations::ExactMatchValidator
- Inherits:
-
Object
- Object
- Neo4j::Rails::Validations::ExactMatchValidator
- Defined in:
- lib/neo4j/rails/validations/uniqueness.rb
Class Method Summary (collapse)
- + (Object) index_type
- + (Object) match(rec, attribute, value)
- + (Object) query(model, attribute, value)
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 |