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