aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authorDiego Carrion <dc.rec1@gmail.com>2011-10-13 16:27:10 -0300
committerDiego Carrion <dc.rec1@gmail.com>2011-10-13 16:27:10 -0300
commitb7cccae71e4c42415f8c0dab7b083ed7db54c0c1 (patch)
tree064f220c42b72b90c301d2d98787a0b964d165e8 /activeresource
parent66b2dc059f6c6649731e762b28b5136bf053daac (diff)
downloadrails-b7cccae71e4c42415f8c0dab7b083ed7db54c0c1.tar.gz
rails-b7cccae71e4c42415f8c0dab7b083ed7db54c0c1.tar.bz2
rails-b7cccae71e4c42415f8c0dab7b083ed7db54c0c1.zip
improved ActiveResource's .element_path and .new_element_path methods documentation by specifing how .site should be declared in order to use prefix_options
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/base.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 03c4cc5b9e..fa5c4470eb 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -637,6 +637,10 @@ module ActiveResource
# Post.element_path(1)
# # => /posts/1.json
#
+ # class Comment < ActiveResource::Base
+ # self.site = "http://37s.sunrise.i/posts/:post_id/"
+ # end
+ #
# Comment.element_path(1, :post_id => 5)
# # => /posts/5/comments/1.json
#
@@ -663,6 +667,10 @@ module ActiveResource
# Post.new_element_path
# # => /posts/new.json
#
+ # class Comment < ActiveResource::Base
+ # self.site = "http://37s.sunrise.i/posts/:post_id/"
+ # end
+ #
# Comment.collection_path(:post_id => 5)
# # => /posts/5/comments/new.json
def new_element_path(prefix_options = {})