提交 e405dbcb 编写于 作者: G Gaston Ramos

- update exceptions documentation

上级 823a8e6e
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册