Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Filtering related objects #16

Open
runa opened this issue Jan 2, 2015 · 1 comment
Open

Filtering related objects #16

runa opened this issue Jan 2, 2015 · 1 comment

Comments

@runa
Copy link
Contributor

runa commented Jan 2, 2015

I would like to get all the adgroups with adgroup_status=ACTIVE for an AdAccount; AFAIK it's not possible to do this kind of filters right now.

Do you think it makes sense to add something like:
AdAccount#ad_groups(filter_hash)

so you could do
AdAccount#ad_groups(adgroup_status: "active")
?

thanks

@jayniz
Copy link
Contributor

jayniz commented Jan 16, 2015

Hey @runa,

if it's not possible to get them filtered from the ads api I think I wouldn't do it this way in zuck. If we have to fetch all of them anyways, about a my_account.ad_groups.select{ |ag| ag.adgroup_status == 'active' }?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants