method
element_path
v2.0.0 -
Show latest stable
-
0 notes -
Class: ActiveResource::Base
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0 (0)
- 2.0.1 (0)
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-14)
- 3.1.0 (2)
- 3.2.1 (38)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
element_path(id, prefix_options = {}, query_options = nil)
public
Gets the element path for the given ID in id. If the query_options parameter is omitted, Rails will split from the prefix options.
Options
| prefix_options: | A hash to add a prefix to the request for nested URL’s (e.g., :account_id => 19 would yield a URL like /accounts/19/purchases.xml). |
| query_options: | A hash to add items to the query string for the request. |
Examples
Post.element_path(1) # => /posts/1.xml Comment.element_path(1, :post_id => 5) # => /posts/5/comments/1.xml Comment.element_path(1, :post_id => 5, :active => 1) # => /posts/5/comments/1.xml?active=1 Comment.element_path(1, {:post_id => 5}, {:active => 1}) # => /posts/5/comments/1.xml?active=1


