From 31110c50e499067ccb8b4c0693d81f4153e6e155 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Sun, 1 May 2011 15:33:27 -0300 Subject: Fix punctuation errors. --- activeresource/lib/active_resource/validations.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb index a373e53f11..ca265d053e 100644 --- a/activeresource/lib/active_resource/validations.rb +++ b/activeresource/lib/active_resource/validations.rb @@ -8,9 +8,9 @@ module ActiveResource # Active Resource validation is reported to and from this object, which is used by Base#save # to determine whether the object in a valid state to be saved. See usage example in Validations. class Errors < ActiveModel::Errors - # Grabs errors from an array of messages (like ActiveRecord::Validations) + # Grabs errors from an array of messages (like ActiveRecord::Validations). # The second parameter directs the errors cache to be cleared (default) - # or not (by passing true) + # or not (by passing true). def from_array(messages, save_cache = false) clear unless save_cache humanized_attributes = Hash[@base.attributes.keys.map { |attr_name| [attr_name.humanize, attr_name] }] @@ -73,7 +73,7 @@ module ActiveResource # clear the remote validations so they don't interfere with the local # ones. Otherwise we get an endless loop and can never change the - # fields so as to make the resource valid + # fields so as to make the resource valid. @remote_errors = nil if perform_validation && valid? || !perform_validation save_without_validation @@ -84,7 +84,7 @@ module ActiveResource rescue ResourceInvalid => error # cache the remote errors because every call to valid? clears # all errors. We must keep a copy to add these back after local - # validations + # validations. @remote_errors = error load_remote_errors(@remote_errors, true) false @@ -92,7 +92,7 @@ module ActiveResource # Loads the set of remote errors into the object's Errors based on the - # content-type of the error-block received + # content-type of the error-block received. def load_remote_errors(remote_errors, save_cache = false ) #:nodoc: case self.class.format when ActiveResource::Formats[:xml] -- cgit v1.2.3