1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

this should never return nil, so no use for "try"

This commit is contained in:
Aaron Patterson 2011-10-31 15:17:16 -04:00
parent 6cbe4223a7
commit 62a86748ae

View file

@ -175,7 +175,7 @@ module ActionController #:nodoc:
private
def normalize!(path)
path << 'index' if path[-1] == ?/
path << ".#{extension}" if extension and !path.split('?').first.try(:ends_with?, ".#{extension}")
path << ".#{extension}" if extension and !path.split('?').first.ends_with?(".#{extension}")
URI.parser.unescape(path)
end
end