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

Remove redundant code.

This commit is contained in:
Guo Xiang Tan 2014-05-20 18:25:20 -07:00
parent dbbcc8388a
commit dbacaff1c3

View file

@ -32,9 +32,8 @@ module ActionDispatch
end end
def render_html(status) def render_html(status)
found = false path = "#{public_path}/#{status}.#{I18n.locale}.html"
path = "#{public_path}/#{status}.#{I18n.locale}.html" if I18n.locale path = "#{public_path}/#{status}.html" unless (found = File.exist?(path))
path = "#{public_path}/#{status}.html" unless path && (found = File.exist?(path))
if found || File.exist?(path) if found || File.exist?(path)
render_format(status, 'text/html', File.read(path)) render_format(status, 'text/html', File.read(path))