prefix=(value = '/')
public
Sets the \prefix for
a resource’s nested URL (e.g., prefix/collectionname/1.xml).
Default value is site.path.
Show source
def prefix=(value = '/')
prefix_call = value.gsub(/:\w+/) { |key| "\#{options[#{key}]}" }
@prefix_parameters = nil
code = "def prefix_source() \"\#{value}\" end\ndef prefix(options={}) \"\#{prefix_call}\" end\n"
silence_warnings { instance_eval code, __FILE__, __LINE__ }
rescue
logger.error "Couldn't set prefix: #{$!}\n #{code}"
raise
end