Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclustion multiple associations with if condition #80

Open
Anilkumar-Amrutham opened this issue Dec 28, 2017 · 0 comments
Open

Exclustion multiple associations with if condition #80

Anilkumar-Amrutham opened this issue Dec 28, 2017 · 0 comments

Comments

@Anilkumar-Amrutham
Copy link

Hi,
I am using Ruby 2.2 and Rails 4.1. amoeba gem '3.1.0'

Trying to exclude multiple children with if condition. If condition functionality is working with only one child exclusion. like below

amoeba do exclude_association :child1, if: :save_as_draft? enable end def save_as_draft? true end

If I use array of children it is not working.
amoeba do exclude_association [:child1, :child2], if: :save_as_draft? enable end def save_as_draft? true end

Please help me out to solve this.
can we exclude like below?
amoeba do exclude_association :child1 exclude_association :child2, if: :save_as_draft? enable end

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

No branches or pull requests

1 participant