diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-24 01:01:25 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2011-12-24 01:01:25 +0300 |
commit | 77ed289609ff02b23b9d3c89aa0aeace8d8b280d (patch) | |
tree | 8a68f435c094a3aad7c6e612061a6d8a2561fa8e /actionpack/lib/action_dispatch | |
parent | 4d8ee28841261827c22322e769cb00c4f4fdc3e6 (diff) | |
download | rails-77ed289609ff02b23b9d3c89aa0aeace8d8b280d.tar.gz rails-77ed289609ff02b23b9d3c89aa0aeace8d8b280d.tar.bz2 rails-77ed289609ff02b23b9d3c89aa0aeace8d8b280d.zip |
remove checking for non-empty string before calling to_sym
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4d83c6dee1..2117cb76b5 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1432,8 +1432,7 @@ module ActionDispatch end def action_path(name, path = nil) #:nodoc: - # Ruby 1.8 can't transform empty strings to symbols - name = name.to_sym if name.is_a?(String) && !name.empty? + name = name.to_sym if name.is_a?(String) path || @scope[:path_names][name] || name.to_s end |