Permalink
Browse files

Merge pull request #4156 from nashby/to-sym-ruby-18

remove checking for non-empty string before calling to_sym
  • Loading branch information...
2 parents 547f32f + 77ed289 commit 9bbe2b800ed87d803a18888b84ba5b73faba2680 @jeremy jeremy committed Dec 24, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1432,8 +1432,7 @@ def path_for_action(action, path) #:nodoc:
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

0 comments on commit 9bbe2b8

Please sign in to comment.