app/queries/decidim/admin/newsletter_recipients.rb in decidim-admin-0.26.10 vs app/queries/decidim/admin/newsletter_recipients.rb in decidim-admin-0.27.0.rc1

- old
+ new

@@ -2,11 +2,11 @@ module Decidim module Admin # A class used to find the recipients of the # Newsletter depending on the params of the form - class NewsletterRecipients < Rectify::Query + class NewsletterRecipients < Decidim::Query # Syntactic sugar to initialize the class and return the queried objects. # # form - params to filter the query def self.for(form) new(form).query @@ -54,10 +54,10 @@ object_class = Decidim.participatory_space_registry.find(type.manifest_name).model_class_name.constantize if type.ids.include?("all") object_class.where(organization: @organization) else - object_class.where(id: type.ids.reject(&:blank?)) + object_class.where(id: type.ids.compact_blank) end end.flatten.compact end # Return the ids of Users that are following