Skip to content

Commit 9fc8950

Browse files
Fixed views not comparing agency_type to enum keys
1 parent 2e5a0a1 commit 9fc8950

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/views/partners/profiles/show/_agency_information.html.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
<dt>Agency Type</dt>
99
<dd><%= t profile.agency_type, scope: :partners_profile %></dd>
10-
11-
<% if profile.agency_type == "Other" %>
10+
<% if profile.agency_type&.to_sym == :other %>
1211
<dt>Other Agency Type</dt>
1312
<dd><%= profile.other_agency_type %></dd>
1413
<% end %>

app/views/profiles/_show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<%# not partner_profile.name, so this pulls from partner.name %>
77
<p>Name: <%= @partner.name %></p>
88
<p>Agency Type: <%= t partner_profile.agency_type, scope: :partners_profile %>
9-
<% if partner_profile.agency_type == "Other" && partner_profile.other_agency_type %>
9+
<% if partner_profile.agency_type&.to_sym == :other && partner_profile.other_agency_type %>
1010
(<%= partner_profile.other_agency_type %>)
1111
<% end %>
1212
</p>

0 commit comments

Comments
 (0)