aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-04 15:21:47 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-04 15:21:47 -0200
commitdfa45ce7e1a3b0974cf6d5c3524483175faabf27 (patch)
tree9161f407b803d068bcbcfe97be0ab3d32f4a2197 /actionpack/lib/action_dispatch
parent54bccc491589e838a83a08335063e811dffc77c7 (diff)
parentf7dbf388bd867cba7a66abf44affb09960ccb4c1 (diff)
downloadrails-dfa45ce7e1a3b0974cf6d5c3524483175faabf27.tar.gz
rails-dfa45ce7e1a3b0974cf6d5c3524483175faabf27.tar.bz2
rails-dfa45ce7e1a3b0974cf6d5c3524483175faabf27.zip
Merge pull request #17792 from rockrep/master
allow 'all' for :domain option in addition to :all
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/middleware/cookies.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index c9fff081d6..8ec05dee70 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -283,7 +283,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