Module: Ripple::Validations::InstanceMethods
- Defined in:
- ripple/lib/ripple/validations.rb
Instance Method Summary (collapse)
-
- (Object) save!
Saves the document and raises DocumentInvalid exception if validations fail.
-
- (Object) update_attributes!(attrs)
Sets the passed attributes and saves the document, raising a DocumentInvalid exception if the validations fail.
Instance Method Details
- (Object) save!
Saves the document and raises DocumentInvalid exception if validations fail.
68 69 70 |
# File 'ripple/lib/ripple/validations.rb', line 68 def save! (raise Ripple::DocumentInvalid.new(self) unless save) || true end |
- (Object) update_attributes!(attrs)
Sets the passed attributes and saves the document, raising a DocumentInvalid exception if the validations fail.
74 75 76 77 |
# File 'ripple/lib/ripple/validations.rb', line 74 def update_attributes!(attrs) self.attributes = attrs save! end |