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-08 21:24:38 -06:00 committed by Sam
parent fca727fd92
commit 5cef71e885

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