This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/controllers/exceptions_controller.rb

15 lines
394 B
Ruby

class ExceptionsController < ApplicationController
skip_before_filter :check_xhr
layout 'no_js'
def not_found
f = Topic.where(deleted_at: nil, archetype: "regular")
@latest = f.order('views desc').take(10)
@recent = f.order('created_at desc').take(10)
@slug = params[:slug].class == String ? params[:slug] : ''
@slug.gsub!('-',' ')
render status: 404
end
end