app/controllers/application_controller.rb
def url_options
    if params[:path]
      { path: params[:path] }.merge(super)
    else
      super
    end
  end
# This makes sure we retain the :path value for routes that require it
This makes sure we retain the :path value for routes that require it
This makes sure we retain the : path value for routes that require it
def url_options
    if params[:path]
      { path: params[:path] }.merge(super)
    else
      super
    end
  end
def url_options if params [ :path ] { path : params [ :path ] } . merge ( super ) else super end end
This makes sure we retain the :path value for routes that require it
This makes sure we retain the : path value for routes that require it