Module: SimpleRecord::Validations::ClassMethods
- Included in:
- Base
- Defined in:
- lib/simple_record/validations.rb
Instance Method Summary collapse
- #uniques ⇒ Object
-
#validates_uniqueness_of(attr) ⇒ Object
only supporting single attr name right now.
Instance Method Details
#uniques ⇒ Object
22 23 24 25 |
# File 'lib/simple_record/validations.rb', line 22 def uniques @uniques ||= {} @uniques end |
#validates_uniqueness_of(attr) ⇒ Object
only supporting single attr name right now
28 29 30 |
# File 'lib/simple_record/validations.rb', line 28 def validates_uniqueness_of(attr) uniques[attr] = true end |