Skip to content

Commit

Permalink
this should never return nil, so no use for "try"
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 31, 2011
1 parent b23cd21 commit 8e6f86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/caching/actions.rb
Expand Up @@ -175,7 +175,7 @@ def initialize(controller, options = {}, infer_extension = true)
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
Expand Down

0 comments on commit 8e6f86e

Please sign in to comment.