Module: MyAddressesHelper
- Defined in:
- app/helpers/my_addresses_helper.rb
Overview
View helper: my addresses.
Instance Method Summary collapse
- #city_placeholder(country_iso3) ⇒ Object
- #class_for_zip(country_iso3) ⇒ Object
- #state_label(country_iso3) ⇒ Object
- #zip_label(country_iso3) ⇒ Object
- #zip_placeholder(country_iso3) ⇒ Object
Instance Method Details
#city_placeholder(country_iso3) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/helpers/my_addresses_helper.rb', line 21 def city_placeholder(country_iso3) case country_iso3 when 'USA' 'e.g. Chicago' else 'e.g. Toronto' end end |
#class_for_zip(country_iso3) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'app/helpers/my_addresses_helper.rb', line 39 def class_for_zip(country_iso3) case country_iso3 when 'USA' 'zip_code' else 'canadian_postal_code' end end |
#state_label(country_iso3) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'app/helpers/my_addresses_helper.rb', line 30 def state_label(country_iso3) case country_iso3 when 'USA' 'State' else 'Province' end end |
#zip_label(country_iso3) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/helpers/my_addresses_helper.rb', line 4 def zip_label(country_iso3) if country_iso3 == 'USA' 'Zip Code' else 'Postal Code' end end |
#zip_placeholder(country_iso3) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/helpers/my_addresses_helper.rb', line 12 def zip_placeholder(country_iso3) case country_iso3 when 'USA' 'e.g. 60606' else 'e.g. L4B 1H7' end end |