Skip to content

Commit a0492e1

Browse files
committed
Fix 404 pages
Bounty#492
1 parent 7f642ec commit a0492e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/controllers/application_controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ def not_on_achievements?
182182
end
183183

184184
def render_404
185-
render template: 'errors/not_found', status: :not_found
185+
respond_to do |format|
186+
format.any(:html, :json, :xml) { render 'errors/not_found', status: :not_found }
187+
format.all { render text: "Not Found", :content_type => Mime::TEXT, status: :not_found }
188+
end
186189
end
187190

188191
def render_500

0 commit comments

Comments
 (0)