aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2014-05-20 18:25:20 -0700
committerGuo Xiang Tan <tgx_world@hotmail.com>2014-05-20 18:25:20 -0700
commitdbacaff1c391f615fcbd18cbfffdf089e57fa332 (patch)
tree8d18672a91343b6156598aed82ccd0325eef47a8 /actionpack
parentdbbcc8388acbcded4ef3a8b17213e3f16a354f32 (diff)
downloadrails-dbacaff1c391f615fcbd18cbfffdf089e57fa332.tar.gz
rails-dbacaff1c391f615fcbd18cbfffdf089e57fa332.tar.bz2
rails-dbacaff1c391f615fcbd18cbfffdf089e57fa332.zip
Remove redundant code.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/public_exceptions.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
index cbb2d475b1..6c8944e067 100644
--- a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
@@ -32,9 +32,8 @@ module ActionDispatch
end
def render_html(status)
- found = false
- path = "#{public_path}/#{status}.#{I18n.locale}.html" if I18n.locale
- path = "#{public_path}/#{status}.html" unless path && (found = File.exist?(path))
+ path = "#{public_path}/#{status}.#{I18n.locale}.html"
+ path = "#{public_path}/#{status}.html" unless (found = File.exist?(path))
if found || File.exist?(path)
render_format(status, 'text/html', File.read(path))