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:
parent
79c2138955
commit
918bb76f76
@ -140,11 +140,7 @@ class ListController < ApplicationController
|
||||
view_method = @category.default_view
|
||||
view_method = 'latest' unless %w(latest top).include?(view_method)
|
||||
|
||||
if view_method == 'top'
|
||||
top(category: @category.id)
|
||||
else
|
||||
self.public_send(view_method)
|
||||
end
|
||||
self.public_send(view_method, category: @category.id)
|
||||
end
|
||||
|
||||
def topics_by
|
||||
|
Loading…
Reference in New Issue
Block a user