Method: ActiveResource::Base.prefix
- Defined in:
- lib/active_resource/base.rb
.prefix(options = {}) ⇒ Object
Gets the prefix for a resource’s nested URL (e.g., prefix/collectionname/1.json) This method is regenerated at runtime based on what the prefix is set to.
734 735 736 737 738 739 740 |
# File 'lib/active_resource/base.rb', line 734 def prefix( = {}) default = site.path default << "/" unless default[-1..-1] == "/" # generate the actual method based on the current site path self.prefix = default prefix() end |