Created
November 16, 2016 13:33
-
-
Save benphelps/0a0127d8abe4ecd3db0cb678a4ac1d34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LocationHelper | |
def render_location_html(location) | |
content_tag :address do | |
content = '' | |
content += location.address_1 + tag(:br) if location.address_1.present? | |
content += location.address_2 + tag(:br) if location.address_2.present? | |
content += location.address_3 + tag(:br) if location.address_3.present? | |
content += location.short if location.short.present? | |
content | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment