Method: Espresso::View::InstanceMethods#overwrite_path

Defined in:
lib/espresso/view.rb

#overwrite_path(overwrites, options = {}) ⇒ String

Overwrites current path. By default uses relative path (started with /), if it is not overwrited in options

Parameters:

  • overwrites (Hash)

    hash of params to overwrite

  • options (Hash) (defaults to: {})

    hash of options to url_for

Returns:

  • (String)

    overwrited path



56
57
58
59
60
# File 'lib/espresso/view.rb', line 56

def overwrite_path(overwrites, options = {})
  options ||= {}
  options[:only_path] = true unless options.key?(:only_path)
  overwrite_url(overwrites, options)
end