Browse files

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

  • Loading branch information...
1 parent 6cbe422 commit 62a86748ae8e6a43c20e917a963a614a02098a58 @tenderlove tenderlove committed Oct 31, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/caching/actions.rb
View
2 actionpack/lib/action_controller/caching/actions.rb
@@ -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

0 comments on commit 62a8674

Please sign in to comment.