mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: Update to lastest rubocop-discourse
This commit is contained in:

committed by
Loïc Guitaut

parent
3b6d4c830f
commit
2a28cda15c
@ -145,7 +145,7 @@ class ListController < ApplicationController
|
||||
def category_default
|
||||
canonical_url "#{Discourse.base_url_no_prefix}#{@category.url}"
|
||||
view_method = @category.default_view
|
||||
view_method = "latest" unless %w[latest top].include?(view_method)
|
||||
view_method = "latest" if %w[latest top].exclude?(view_method)
|
||||
|
||||
self.public_send(view_method, category: @category.id)
|
||||
end
|
||||
|
Reference in New Issue
Block a user