diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 14798695748df..47988df5b5fc4 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -637,6 +637,10 @@ def prefix(options={}) "#{prefix_call}" end # 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 @@ def element_path(id, prefix_options = {}, query_options = nil) # 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 = {})