lib/eucalyptus/custom_audience.rb in eucalyptus-0.2.9 vs lib/eucalyptus/custom_audience.rb in eucalyptus-0.2.10

- old
+ new

@@ -4,11 +4,11 @@ class CustomAudience < Resource def self.api_path "customaudiences" end - def ad_sets - AdSet.all.collect do |ad_set| + def ad_sets(from_collection: AdSet.all) + from_collection.collect do |ad_set| if ad_set.targeting.custom_audiences ad_set if ad_set.targeting.custom_audiences.any?{|a| a["id"] == self.id } end end.compact end