mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Initial release of Discourse
This commit is contained in:
commit
21b5628528
2932 changed files with 143949 additions and 0 deletions
15
app/controllers/exceptions_controller.rb
Normal file
15
app/controllers/exceptions_controller.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue