diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-20 23:25:13 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-20 23:25:13 -0300 |
commit | b17f6e6877162648936c32e62c58305861beaf70 (patch) | |
tree | dfc82b894bdfd1c9cb46e0fd785e593e81011820 | |
parent | decd71971178fc82c6442a207b79fa2462bdfc8d (diff) | |
parent | dbacaff1c391f615fcbd18cbfffdf089e57fa332 (diff) | |
download | rails-b17f6e6877162648936c32e62c58305861beaf70.tar.gz rails-b17f6e6877162648936c32e62c58305861beaf70.tar.bz2 rails-b17f6e6877162648936c32e62c58305861beaf70.zip |
Merge pull request #15213 from tgxworld/remove_redundant_code
Remove redundant code.
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/public_exceptions.rb | 5 |
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)) |