Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- update exceptions documentation

  • Loading branch information...
commit e405dbcb4896054d517c6e0cb8b737e5e632c617 1 parent 823a8e6
Gastón Ramos gramos authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 activeresource/lib/active_resource/base.rb
11 activeresource/lib/active_resource/base.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.