Commit 2474de7b authored by Arturo Herrero's avatar Arturo Herrero
parent dda05d4f
......@@ -185,6 +185,8 @@ class Service < ApplicationRecord
private_class_method :build_nonexistent_services_for
def self.list_nonexistent_services_for(scope)
# Using #map instead of #pluck to save one query count. This is because
# ActiveRecord loaded the object here, so we don't need to query again later.
available_services_types - scope.map(&:type)
end
private_class_method :list_nonexistent_services_for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment