diff options
author | brainopia <brainopia@evilmartians.com> | 2012-04-30 15:50:54 +0400 |
---|---|---|
committer | brainopia <brainopia@evilmartians.com> | 2012-04-30 17:04:16 +0400 |
commit | dbe5162496623c919457da1db7b5843f3dbe733f (patch) | |
tree | c9d68d4f49ba26e5dba4f635c30c5f002ce35735 /actionpack/lib/action_dispatch | |
parent | 312ee8637366572425c9b3147a6477583333cf34 (diff) | |
download | rails-dbe5162496623c919457da1db7b5843f3dbe733f.tar.gz rails-dbe5162496623c919457da1db7b5843f3dbe733f.tar.bz2 rails-dbe5162496623c919457da1db7b5843f3dbe733f.zip |
Simplify matching with array of possible domains
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 4b91515df4..9b9227b659 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -154,7 +154,7 @@ module ActionDispatch end elsif options[:domain].is_a? Array # if host matches one of the supplied domains without a dot in front of it - options[:domain] = options[:domain].find {|domain| @host.include? domain[/^\.?(.*)$/, 1] } + options[:domain] = options[:domain].find {|domain| @host.include? domain.sub(/^\./, '') } end end |