def nested_path_by(field, opts = {})
      options = { delimiter: '/', prefix: '' }
      options.merge!(opts)
      delimiter = options[:delimiter]
      prefix = options[:prefix].empty? ? '' : "#{options[:prefix]}#{delimiter}"
      path = ([self] + ancestors).reverse.collect { |a| a.send(field) }.join(delimiter).gsub(prefix, '')

      delimiter + path
    end
def nested_path_by(field, opts = {})
      options = { delimiter: '/', prefix: '' }
      options.merge!(opts)
      delimiter = options[:delimiter]
      prefix = options[:prefix].empty? ? '' : "#{options[:prefix]}#{delimiter}"
      path = ([self] + ancestors).reverse.collect { |a| a.send(field) }.join(delimiter).gsub(prefix, '')

      delimiter + path
    end
Given a field (and optional delimiter), return a path to the current object.
 e.g. you'd end up with /path/to/page (where this object is 'page')

 @param field [Symbol] the field to use to create the path
 @param opts [Hash] the delimiter to use. Defaults to "/"
 @return [String] the path as a string