lib/roda/plugins/run_append_slash.rb
# Calls the given rack app. If the path matches the root of the app but
# does not contain a trailing slash, a trailing slash is appended to the
# path internally, or a redirect is issued when configured with
# <tt>use_redirects: true</tt>.
Calls the given rack app. If the path matches the root of the app but
does not contain a trailing slash, a trailing slash is appended to the
path internally, or a redirect is issued when configured with
use_redirects: true.
Calls the given rack app . If the path matches the root of the app but does not contain a trailing slash a trailing slash is appended to the path internally or a redirect is issued when configured with use_redirects : true .
def run(*)
          if remaining_path.empty?
            if scope.opts[:run_append_slash_redirect]
              redirect("#{path}/")
            else
              @remaining_path += '/'
            end
          end
          super
        end
def run ( * ) if remaining_path . empty? if scope . opts [ :run_append_slash_redirect ] redirect ( "#{path}/" ) else @remaining_path += '/' end end super end
Calls the given rack app.
Calls the given rack app .