From f7dbf388bd867cba7a66abf44affb09960ccb4c1 Mon Sep 17 00:00:00 2001 From: rockrep Date: Wed, 26 Nov 2014 13:34:52 -0800 Subject: allow 'all' for :domain option in addition to :all --- actionpack/lib/action_dispatch/middleware/cookies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 2f148752cb..f2d3e93aff 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -155,7 +155,7 @@ module ActionDispatch def handle_options(options) #:nodoc: options[:path] ||= "/" - if options[:domain] == :all + if options[:domain].respond_to?(:to_sym) && options[:domain].to_sym == :all # if there is a provided tld length then we use it otherwise default domain regexp domain_regexp = options[:tld_length] ? /([^.]+\.?){#{options[:tld_length]}}$/ : DOMAIN_REGEXP -- cgit v1.2.3