DEV: remove uneeded distinct from relation

No need to call `.distinct` when a unique index already exists.
This commit is contained in:
jwjwyoung
2019-12-09 14:24:38 +11:00
committed by Sam
parent fca727fd92
commit 5cef71e885
+1 -1
View File
@@ -119,7 +119,7 @@ class Theme < ActiveRecord::Base
def self.components_for(theme_id)
get_set_cache "theme_components_for_#{theme_id}" do
ChildTheme.where(parent_theme_id: theme_id).distinct.pluck(:child_theme_id)
ChildTheme.where(parent_theme_id: theme_id).pluck(:child_theme_id)
end
end