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