effective_addresses 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04c90ea7c4568fe3c95ea6a070d0c45f6a836dc7
4
- data.tar.gz: a181edd95b89dcf31e12605e1f2b5628fc962d9c
3
+ metadata.gz: 41c69251c76730e7fe6cf466b4d892e39cdc9569
4
+ data.tar.gz: 9561541536799e5f8f4d3fab9a8f23390c9d45d5
5
5
  SHA512:
6
- metadata.gz: 4d3a90340426b5addcffce1161dae0399a37fd3bbe7583636dceef0ef8093957698a0ac75268739404009350c62d10de7ca9ef6701bacb18a95bd07282be400e
7
- data.tar.gz: 59a4afb5daee0c48aec5d2e25d3ce94263a629a67894824fb240b61dc923f64241ab821285b3726bc96e4a57c556b00aa3b195287fbd2f142e2b1cf3f7340367
6
+ metadata.gz: f135e6e8b0d6512f62df507af47590ca7b7aa2ab9a1960337afac042809b94099c025731542b698c342c9fd4c0f3eacc4e3041a1b5a33fbcfabae9160a6f0a14
7
+ data.tar.gz: 4e49543e8691690ac0978dc2ae5b15dd0427c6450769f2660f0b7c4c982e9addb856495918c4b5d9c4173b68a3d01145e2d22868422671a769ed893ab838eb06
@@ -40,7 +40,7 @@ module EffectiveAddressesHelper
40
40
  collection.insert(0, ['---------------------', '', :disabled])
41
41
 
42
42
  EffectiveAddresses.country_codes_priority.reverse.each do |code|
43
- if (country = countries.coded(code))
43
+ if (country = Carmen::Country.coded(code))
44
44
  collection.insert(0, [country.name, country.code])
45
45
  end
46
46
  end
@@ -6,17 +6,18 @@
6
6
  - fa.object.errors.add(:address1, f.object.errors[method].first)
7
7
 
8
8
  - if use_full_name || fa.object.errors.include?(:full_name)
9
- = fa.input :full_name, :required => required, :label => 'Full name', :placeholder => 'Full name'
9
+ = fa.input :full_name, :required => required
10
10
 
11
- = fa.input :address1, :placeholder => 'Address', :label => 'Address 1', :required => required
12
- = fa.input :address2, :label => 'Address 2'
13
- = fa.input :city, :placeholder => 'City', :required => required
14
11
 
15
- = fa.input :country_code, :as => :select, :label => 'Country', :prompt => 'Choose country...', :collection => region_options_for_simple_form_select(), :input_html => {'data-effective-address-country' => uuid}, :required => required
12
+ = fa.input :address1, :required => required
13
+ = fa.input :address2
14
+ = fa.input :city, :required => required
15
+
16
+ = fa.input :country_code, :as => :select, :collection => region_options_for_simple_form_select(), :input_html => {'data-effective-address-country' => uuid}, :required => required
16
17
 
17
18
  - if fa.object.try(:country_code).present?
18
- = fa.input :state_code, :as => :select, :label => 'Province / State', :prompt => 'Please choose a country first', :collection => region_options_for_simple_form_select(Carmen::Country.coded(fa.object.country_code).subregions), :input_html => {'data-effective-address-state' => uuid}, :required => required
19
+ = fa.input :state_code, :as => :select, :collection => region_options_for_simple_form_select(Carmen::Country.coded(fa.object.country_code).subregions), :input_html => {'data-effective-address-state' => uuid}, :required => required
19
20
  - else
20
- = fa.input :state_code, :as => :select, :label => 'Province / State', :disabled => true, :prompt => 'Please choose a country', :collection => [], :input_html => { 'data-effective-address-state' => uuid }, :required => required
21
+ = fa.input :state_code, :as => :select, :disabled => true, :collection => [], :input_html => { 'data-effective-address-state' => uuid }, :required => required
21
22
 
22
- = fa.input :postal_code, :label => 'Postal / Zip code', :placeholder => 'Postal / Zip code', :required => required
23
+ = fa.input :postal_code, :required => required
@@ -0,0 +1,25 @@
1
+ en:
2
+ simple_form:
3
+ labels:
4
+ defaults:
5
+ full_name: Full name
6
+ address1: Address 1
7
+ address2: Address 2
8
+ country_code: Country
9
+ state_code: Province / State
10
+ postal_code: Postal / Zip code
11
+
12
+ # hints:
13
+ # defaults:
14
+
15
+ placeholders:
16
+ defaults:
17
+ full_name: Full name
18
+ address1: Address
19
+ city: City
20
+ postal_code: Postal / Zip code
21
+
22
+ prompts:
23
+ defaults:
24
+ country_code: Choose country...
25
+ state_code: Please choose a country first
@@ -1,3 +1,3 @@
1
1
  module EffectiveAddresses
2
- VERSION = '1.2.3'.freeze
2
+ VERSION = '1.2.4'.freeze
3
3
  end
@@ -11,7 +11,7 @@ EffectiveAddresses.setup do |config|
11
11
  #config.country_codes = ['US', 'CA'] # Or you can be more selective...
12
12
 
13
13
  # Select these countries ontop of the others
14
- config.country_codes_priority = ['US', 'CA'] # Leave empty array for no priority countries
14
+ config.country_codes_priority = ['US', 'CA'] # nil for no priority countries
15
15
 
16
16
  # Preselect this country on any new address forms
17
17
  # Valid values are: country code, country name, or nil
@@ -8,7 +8,7 @@ EffectiveAddresses.setup do |config|
8
8
 
9
9
  # Country codes to display in country_select dropdowns.
10
10
  config.country_codes = :all #
11
- config.country_codes_priority = ['US', 'CA'] # Leave empty array for no priority countries
11
+ config.country_codes_priority = ['US', 'CA'] # nil for no priority countries
12
12
 
13
13
  # Or you can be more selective...
14
14
  #config.country_codes = ['US', 'CA']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_addresses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-12 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -257,6 +257,7 @@ files:
257
257
  - app/views/effective/addresses/_address_fields_formtastic.html.haml
258
258
  - app/views/effective/addresses/_address_fields_simple_form.html.haml
259
259
  - app/views/effective/addresses/_subregions.html.haml
260
+ - config/locales/simple_form.en.yml
260
261
  - config/routes.rb
261
262
  - db/migrate/01_create_effective_addresses.rb.erb
262
263
  - lib/effective_addresses.rb