Field#to_param should return a hash when Merb is not defined for Mechanize support [#62 state:resolved]

This commit is contained in:
Bryan Helmkamp 2008-11-18 20:48:12 -05:00
parent 5a9c048dfb
commit df9d8179c0
1 changed files with 3 additions and 1 deletions

View File

@ -76,8 +76,10 @@ module Webrat
CGIMethods.parse_query_parameters(key_and_value)
elsif defined?(ActionController::AbstractRequest)
ActionController::AbstractRequest.parse_query_parameters(key_and_value)
else
elsif defined?(::Merb)
::Merb::Parse.query(key_and_value)
else
{ name => escaped_value } # For mechanize
end
end