lib/rails/info_controller.rb in railties-7.1.5 vs lib/rails/info_controller.rb in railties-7.2.0.beta1

- old
+ new

@@ -5,12 +5,10 @@ class Rails::InfoController < Rails::ApplicationController # :nodoc: prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS layout -> { request.xhr? ? false : "application" } - RFC2396_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new - before_action :require_local! def index redirect_to action: :routes end @@ -20,11 +18,11 @@ @page_title = "Properties" end def routes if query = params[:query] - query = RFC2396_PARSER.escape query + query = URI::DEFAULT_PARSER.escape query render json: { exact: matching_routes(query: query, exact_match: true), fuzzy: matching_routes(query: query, exact_match: false) } @@ -53,10 +51,10 @@ end match ||= (query === route_wrapper.verb) unless match - controller_action = RFC2396_PARSER.escape(route_wrapper.reqs) + controller_action = URI::DEFAULT_PARSER.escape(route_wrapper.reqs) match = exact_match ? (query === controller_action) : controller_action.include?(query) end route_wrapper.path if match end