mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
15 lines
441 B
Ruby
15 lines
441 B
Ruby
class ExceptionsController < ApplicationController
|
|
skip_before_filter :check_xhr
|
|
skip_before_filter :check_restricted_access
|
|
layout 'no_js'
|
|
|
|
def not_found
|
|
f = Topic.where(deleted_at: nil, archetype: "regular")
|
|
|
|
@popular = 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
|