Browse files

remove checking for non-empty string before calling to_sym

  • Loading branch information...
1 parent 4d8ee28 commit 77ed289609ff02b23b9d3c89aa0aeace8d8b280d @nashby nashby committed Dec 24, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_dispatch/routing/mapper.rb
View
3 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 77ed289

Please sign in to comment.