From 0204c2766d63ab869c036a0c0074b19a65a511b2 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 20 Jan 2009 00:20:12 -0500 Subject: [PATCH] Change query params parser to work with Edge Rails --- History.txt | 1 + lib/webrat/core/elements/field.rb | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/History.txt b/History.txt index 1fe32b7..843c196 100644 --- a/History.txt +++ b/History.txt @@ -2,6 +2,7 @@ * Bug fixes + * Update query param parsing to work with latest Edge Rails * Ensure the previous pages params aren't passed through redirect * Labels should only search for fields within the current scope (Kyle Hargraves) diff --git a/lib/webrat/core/elements/field.rb b/lib/webrat/core/elements/field.rb index 9c5073e..ffd5d1d 100644 --- a/lib/webrat/core/elements/field.rb +++ b/lib/webrat/core/elements/field.rb @@ -98,10 +98,11 @@ module Webrat protected def rails_request_parser - if defined?(ActionController::RequestParser) # For Rails > 2.2 - ActionController::RequestParser - else + if defined?(ActionController::AbstractRequest) ActionController::AbstractRequest + else + # For Rails > 2.2 + ActionController::UrlEncodedPairParser end end