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

[Refactor] Literal string value of Partner::AGENCY_TYPES["OTHER"] is used in some erb files #4232

Closed
callmarx opened this issue Mar 27, 2024 · 1 comment

Comments

@callmarx
Copy link
Contributor

Summary

Working on issue #3067 I've noticed that in some erb files they are checking if agency_type is other with the literal string value instead of Partner::AGENCY_TYPES["OTHER"].

For example, in app/views/profiles/_show.html.erb line 9 we have:

...
    <% if partner_profile.agency_type == "Other" && partner_profile.other_agency_type %>
      (<%= partner_profile.other_agency_type %>)
    <% end %>
...

And this should be:

...
    <% if partner_profile.agency_type == Partner::AGENCY_TYPES["OTHER"] && partner_profile.other_agency_type %>
      (<%= partner_profile.other_agency_type %>)
    <% end %>
...

Things to consider

As I chated on slack with @cielf, this has no urgency at the moment since the odds of Partner::AGENCY_TYPES["OTHER"] changing are low and we also think thats could be a Good First Issue.

Criteria for Completion

No response

@dorner
Copy link
Collaborator

dorner commented Mar 31, 2024

Hey @callmarx - after discussion we think there's a better approach to fixing this as documented in #4241. Closing this in favor of that one. Thanks for the suggestion!

@dorner dorner closed this as completed Mar 31, 2024
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

2 participants