A platform for community discussion. Free, open, simple.
DEV: No need to look up a category repeatedly by its slug
Daniel Waterworth918bb76f7635
diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rbindex e7c0de86dc1..66833a623fc 100644--- a/app/controllers/list_controller.rb+++ b/app/controllers/list_controller.rb@@ -140,11 +140,7 @@ class ListController < ApplicationControllerview_method = @category.default_viewview_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)enddef topics_by