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

Merge pull request #15213 from tgxworld/remove_redundant_code

Remove redundant code.
This commit is contained in:
Rafael Mendonça França 2014-05-20 23:25:13 -03:00
commit b17f6e6877

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))