static public Method

Base.prefix(options={})

Gets the prefix for a resource’s nested URL (e.g., prefix/collectionname/1.xml) This method is regenerated at runtime based on what the prefix is set to.

Source Code

# File active_resource/base.rb, line 228
def prefix(options={})
  default = site.path
  default << '/' unless default[-1..-1] == '/'
  # generate the actual method based on the current site path
  self.prefix = default
  prefix(options)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.