diff --git a/CHANGELOG b/CHANGELOG index 3ee26b775..e5f6c20fe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Use :words_connector instead of connector in RequiresParameters [cody] * Fix extra slash in UPS endpoints [cody] * Add name to Shipwire class [cody] * Improve FedEx handling of some error conditions [cody] diff --git a/lib/active_shipping/lib/requires_parameters.rb b/lib/active_shipping/lib/requires_parameters.rb index 7a30480e7..22bce54ae 100644 --- a/lib/active_shipping/lib/requires_parameters.rb +++ b/lib/active_shipping/lib/requires_parameters.rb @@ -6,7 +6,7 @@ def requires!(hash, *params) raise ArgumentError.new("Missing required parameter: #{param.first}") unless hash.has_key?(param.first) valid_options = param[1..-1] - raise ArgumentError.new("Parameter: #{param.first} must be one of #{valid_options.to_sentence(:connector => 'or')}") unless valid_options.include?(hash[param.first]) + raise ArgumentError.new("Parameter: #{param.first} must be one of #{valid_options.to_sentence(:words_connector => 'or')}") unless valid_options.include?(hash[param.first]) else raise ArgumentError.new("Missing required parameter: #{param}") unless hash.has_key?(param) end