Module: MyAddressesHelper
- Defined in:
- app/helpers/my_addresses_helper.rb
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
27 28 29 30 31 32 33 34 |
# File 'app/helpers/my_addresses_helper.rb', line 27 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
45 46 47 48 49 50 51 52 |
# File 'app/helpers/my_addresses_helper.rb', line 45 def class_for_zip(country_iso3) case country_iso3 when 'USA' 'zip_code' else 'canadian_postal_code' end end |
#state_label(country_iso3) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/helpers/my_addresses_helper.rb', line 10 def state_label(country_iso3) if country_iso3 == 'USA' 'State' else 'Province' end end |
#zip_label(country_iso3) ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/helpers/my_addresses_helper.rb', line 2 def zip_label(country_iso3) if country_iso3 == 'USA' 'Zip Code' else 'Postal Code' end end |
#zip_placeholder(country_iso3) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'app/helpers/my_addresses_helper.rb', line 18 def zip_placeholder(country_iso3) case country_iso3 when 'USA' 'e.g. 60606' else 'e.g. L4B 1H7' end end |