Module: Elastictastic::Validations::InstanceMethods
- Defined in:
- lib/elastictastic/validations.rb
Instance Method Summary collapse
Instance Method Details
#save ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/elastictastic/validations.rb', line 19 def save if valid? super true else false end end |
#save! ⇒ Object
28 29 30 31 32 33 |
# File 'lib/elastictastic/validations.rb', line 28 def save! if !save raise Elastictastic::RecordInvalid, errors..to_sentence end self end |