Skip to content
This repository was archived by the owner on Aug 13, 2020. It is now read-only.

Conversation

@brascoder
Copy link
Contributor

@brascoder brascoder commented May 23, 2019

Addresses #402

Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really clean. Love it.


def create
@campaign = Campaign.new(campaign_params)
@campaign.country_codes = @campaign.country_codes.filter { |code| code.present? }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great but consider @campaign.country_codes.select(&:present?) to be a bit more idiomatic.

return this.leafTargets.some((leaf) => {
return leaf.checked;
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might consider moving these helper methods out as first class private methods of the controller.

@hopsoft hopsoft merged commit 15d288b into gitcoinco:master May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants