aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/README2
-rw-r--r--activeresource/lib/active_resource/base.rb22
-rw-r--r--activeresource/lib/active_resource/custom_methods.rb4
-rw-r--r--activeresource/lib/active_resource/http_mock.rb2
4 files changed, 15 insertions, 15 deletions
diff --git a/activeresource/README b/activeresource/README
index bcb7b3cbc7..924017a659 100644
--- a/activeresource/README
+++ b/activeresource/README
@@ -37,7 +37,7 @@ lifecycle methods that operate against a persistent store.
Person.exists?(1) #=> true
As you can see, the methods are quite similar to Active Record's methods for dealing with database
-records. But rather than dealing with
+records. But rather than dealing directly with a database record, you're dealing with HTTP resources (which may or may not be database records).
==== Protocol
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 347dbb82aa..492ab27bef 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -111,7 +111,7 @@ module ActiveResource
# over HTTPS.
#
# Note: Some values cannot be provided in the URL passed to site. e.g. email addresses
- # as usernames. In those situations you should use the seperate user and password option.
+ # as usernames. In those situations you should use the separate user and password option.
# == Errors & Validation
#
# Error handling and validation is handled in much the same manner as you're used to seeing in
@@ -200,7 +200,7 @@ module ActiveResource
cattr_accessor :logger
class << self
- # Gets the URI of the REST resources to map for this class. The site variable is required
+ # Gets the URI of the REST resources to map for this class. The site variable is required for
# Active Resource's mapping to work.
def site
# Not using superclass_delegating_reader because don't want subclasses to modify superclass instance
@@ -226,7 +226,7 @@ module ActiveResource
end
# Sets the URI of the REST resources to map for this class to the value in the +site+ argument.
- # The site variable is required Active Resource's mapping to work.
+ # The site variable is required for Active Resource's mapping to work.
def site=(site)
@connection = nil
if site.nil?
@@ -288,7 +288,7 @@ module ActiveResource
end
# Returns the current format, default is ActiveResource::Formats::XmlFormat.
- def format # :nodoc:
+ def format
read_inheritable_attribute("format") || ActiveResource::Formats[:xml]
end
@@ -298,7 +298,7 @@ module ActiveResource
@timeout = timeout
end
- # Gets tthe number of seconds after which requests to the REST API should time out.
+ # Gets the number of seconds after which requests to the REST API should time out.
def timeout
if defined?(@timeout)
@timeout
@@ -426,16 +426,16 @@ module ActiveResource
alias_method :set_primary_key, :primary_key= #:nodoc:
- # Create a new resource instance and request to the remote service
+ # Creates a new resource instance and makes a request to the remote service
# that it be saved, making it equivalent to the following simultaneous calls:
#
# ryan = Person.new(:first => 'ryan')
# ryan.save
#
- # The newly created resource is returned. If a failure has occurred an
- # exception will be raised (see save). If the resource is invalid and
- # has not been saved then valid? will return <tt>false</tt>,
- # while new? will still return <tt>true</tt>.
+ # Returns the newly created resource. If a failure has occurred an
+ # exception will be raised (see <tt>save</tt>). If the resource is invalid and
+ # has not been saved then <tt>valid?</tt> will return <tt>false</tt>,
+ # while <tt>new?</tt> will still return <tt>true</tt>.
#
# ==== Examples
# Person.create(:name => 'Jeremy', :email => 'myname@nospam.com', :enabled => true)
@@ -812,7 +812,7 @@ module ActiveResource
# Person.delete(guys_id)
# that_guy.exists? # => false
def exists?
- !new? && self.class.exists?(to_param, :params => prefix_options)
+ !new? && self.class.exists?(to_param, :params => prefix_options)
end
# A method to convert the the resource to an XML string.
diff --git a/activeresource/lib/active_resource/custom_methods.rb b/activeresource/lib/active_resource/custom_methods.rb
index 4c8699288c..770116ceb7 100644
--- a/activeresource/lib/active_resource/custom_methods.rb
+++ b/activeresource/lib/active_resource/custom_methods.rb
@@ -48,8 +48,8 @@ module ActiveResource
# # => [{:id => 1, :name => 'Ryan'}]
#
# Note: the objects returned from this method are not automatically converted
- # into Active Resource instances - they are ordinary Hashes. If you are expecting
- # Active Resource instances, use the <tt>find</tt> class method with the
+ # into ActiveResource::Base instances - they are ordinary Hashes. If you are expecting
+ # ActiveResource::Base instances, use the <tt>find</tt> class method with the
# <tt>:from</tt> option. For example:
#
# Person.find(:all, :from => :active)
diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb
index 22f83ae910..554fc3bcfc 100644
--- a/activeresource/lib/active_resource/http_mock.rb
+++ b/activeresource/lib/active_resource/http_mock.rb
@@ -65,7 +65,7 @@ module ActiveResource
class << self
# Returns an array of all request objects that have been sent to the mock. You can use this to check
- # wether or not your model actually sent an HTTP request.
+ # if your model actually sent an HTTP request.
#
# ==== Example
# def setup