Skip to content

Commit

Permalink
Fix render file: deprecation warning (#3454)
Browse files Browse the repository at this point in the history
DEPRECATION WARNING: render file: should be given the absolute path to a file

We were giving it an absolute path, but removing the `.html` so it was causing
a deprecation warning to be shown while running this code.
  • Loading branch information
parndt committed Nov 7, 2019
1 parent 8395518 commit edeba87
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/lib/refinery/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def error_404(exception = nil)
# fallback to the default 404.html page.
file = Rails.root.join 'public', '404.html'
file = Refinery.roots('refinery/core').join('public', '404.html') unless file.exist?
render file: file.cleanpath.to_s.gsub(%r{#{file.extname}$}, ''),
layout: false, status: 404, format: :html
render file: file, format: :html, layout: false, status: 404
return false
end

Expand Down

0 comments on commit edeba87

Please sign in to comment.