Module: Roda::RodaPlugins::RedirectPath::RequestMethods

Defined in:
lib/roda/plugins/redirect_path.rb

Instance Method Summary collapse

Instance Method Details

#redirect(path = default_redirect_path, status = default_redirect_status) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/roda/plugins/redirect_path.rb', line 42

def redirect(path=default_redirect_path, status=default_redirect_status)
  if String === path
    super
  else
    path = scope.path(path)
    if status.is_a?(String)
      super(path + status)
    else
      super
    end
  end
end