mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: No need to look up a category repeatedly by its slug
This commit is contained in:
@@ -140,11 +140,7 @@ class ListController < ApplicationController
|
|||||||
view_method = @category.default_view
|
view_method = @category.default_view
|
||||||
view_method = 'latest' unless %w(latest top).include?(view_method)
|
view_method = 'latest' unless %w(latest top).include?(view_method)
|
||||||
|
|
||||||
if view_method == 'top'
|
self.public_send(view_method, category: @category.id)
|
||||||
top(category: @category.id)
|
|
||||||
else
|
|
||||||
self.public_send(view_method)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def topics_by
|
def topics_by
|
||||||
|
|||||||
Reference in New Issue
Block a user