diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-04 15:24:16 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-04 15:24:16 -0200 |
commit | 2673a359e1020390cc8ae0208e7795f61c9fba89 (patch) | |
tree | ead708551aa5e394549f829809cd81abba9d06b0 /actionpack/lib/action_dispatch/middleware | |
parent | dfa45ce7e1a3b0974cf6d5c3524483175faabf27 (diff) | |
download | rails-2673a359e1020390cc8ae0208e7795f61c9fba89.tar.gz rails-2673a359e1020390cc8ae0208e7795f61c9fba89.tar.bz2 rails-2673a359e1020390cc8ae0208e7795f61c9fba89.zip |
We don't need to call to_sym. Just compare the string
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 2 |
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 8ec05dee70..93d1d33f78 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].respond_to?(:to_sym) && options[:domain].to_sym == :all + if options[:domain] == :all || options[:domain] == '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 |