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

[Backport] Fix valuation tags being overwritten #3330

Merged
merged 2 commits into from
Feb 26, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Feb 26, 2019

References

Objectives

Fix a bug which removed an investment's valuation tags when marking it as visible to valuators.

Notes

As explained in the commit message:

When params[:budget_investment][:valuation_tag_list] was not present, which is the case when updating an investment using the "mark as visible to valuators" checkbox, we were removing all valuation tags.

Using a virtual attribute to assign the tags only if the parameter is present simplifies the code in the controller and avoids the issue.

When params[:budget_investment][:valuation_tag_list] was not present,
which is the case when updating an investment using the "mark as visible
to valuators" checkbox, we were removing all valuation tags.

Using a virtual attribute to assign the tags only if the parameter is
present simplifies the code in the controller and avoids the issue.
It was strange to set the valuation tags using `valuation_tag_list=` but
then accessing the valuation tags using `tag_list_on(:valuation)`.
@javierm javierm merged commit 86a1f5e into master Feb 26, 2019
@javierm javierm deleted the backport-fix_valuation_tags branch February 26, 2019 20:43
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

Successfully merging this pull request may close these issues.

None yet

3 participants