Commit b4c42da18a193d6f7e8a3180b9ff2f1e621217ae
Committed by
Larissa Reis
1 parent
fc18feab
Exists in
master
and in
29 other branches
Adds helper for displaying a profile's city and state
Signed-off-by: Larissa Reis <larissa@colivre.coop.br>
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
app/helpers/search_helper.rb
... | ... | @@ -106,6 +106,10 @@ module SearchHelper |
106 | 106 | end |
107 | 107 | end |
108 | 108 | |
109 | + def city_with_state_for_profile(p) | |
110 | + city_with_state(p.region) || [p.city, p.state].compact.reject(&:blank?).join(', ') | |
111 | + end | |
112 | + | |
109 | 113 | def display_selector(asset, display, float = 'right') |
110 | 114 | display = nil if display.blank? |
111 | 115 | display ||= asset_class(asset).default_search_display | ... | ... |