Created
April 29, 2014 15:23
-
-
Save joshuaogle/11403554 to your computer and use it in GitHub Desktop.
Rails full_address decorator
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
| def full_address | |
| address_1 = join_present([address_line_1, address_line_2], ', ') | |
| address_2 = join_present([city, state], ', ') | |
| address_2 = join_present([address_2, zip], ' ') | |
| join_present([address_1, address_2, country], '<br>') | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment