aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
diff options
context:
space:
mode:
authorGaston Ramos <ramos.gaston@gmail.com>2010-09-13 19:34:46 -0300
committerGaston Ramos <ramos.gaston@gmail.com>2010-09-27 15:25:39 -0300
commite405dbcb4896054d517c6e0cb8b737e5e632c617 (patch)
tree1199c09351c2875f174f2defcd53fb50e8769e87 /activeresource/lib/active_resource/base.rb
parent823a8e6e66b6e63583f569fdbc2e9cffa9430bf8 (diff)
downloadrails-e405dbcb4896054d517c6e0cb8b737e5e632c617.tar.gz
rails-e405dbcb4896054d517c6e0cb8b737e5e632c617.tar.bz2
rails-e405dbcb4896054d517c6e0cb8b737e5e632c617.zip
- update exceptions documentation
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r--activeresource/lib/active_resource/base.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 9442eba8af..6135ce4ec1 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -166,6 +166,7 @@ module ActiveResource
# # GET http://api.people.com:3000/people/999.xml
# ryan = Person.find(999) # 404, raises ActiveResource::ResourceNotFound
#
+ #
# <tt>404</tt> is just one of the HTTP error response codes that Active Resource will handle with its own exception. The
# following HTTP response codes will also result in these exceptions:
#
@@ -194,6 +195,16 @@ module ActiveResource
# redirect_to :action => 'new'
# end
#
+ # When a GET is requested for a nested resource and you don't provide the prefix_param
+ # an ActiveResource::MissingPrefixParam will be raised.
+ #
+ # class Comment < ActiveResource::Base
+ # self.site = "http://someip.com/posts/:post_id/"
+ # end
+ #
+ # Comment.find(1)
+ # # => ActiveResource::MissingPrefixParam: post_id prefix_option is missing
+ #
# === Validation errors
#
# Active Resource supports validations on resources and will return errors if any of these validations fail