From 076e198287d9c49db97daf6cde02fdaf812db8dc Mon Sep 17 00:00:00 2001 From: Marcello Nuccio Date: Wed, 7 Jan 2009 03:17:26 +0100 Subject: [PATCH] In rails-2.3 parse_query_parameters is in RequestParser --- lib/webrat/core/elements/field.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/webrat/core/elements/field.rb b/lib/webrat/core/elements/field.rb index 8f16ba3..257c142 100644 --- a/lib/webrat/core/elements/field.rb +++ b/lib/webrat/core/elements/field.rb @@ -79,7 +79,11 @@ module Webrat case Webrat.configuration.mode when :rails - ActionController::AbstractRequest.parse_query_parameters("#{name}=#{escaped_value}") + if defined?(ActionController::RequestParser) + ActionController::RequestParser.parse_query_parameters("#{name}=#{escaped_value}") + else + ActionController::AbstractRequest.parse_query_parameters("#{name}=#{escaped_value}") + end when :merb ::Merb::Parse.query("#{name}=#{escaped_value}") else