effective_orders 1.3.9 → 1.3.10

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: 43b383536ee1e55debc29d4a917bf84f0160309f
4
- data.tar.gz: 910ed9b65fd64b892c9071a0f9d282311d8e7885
3
+ metadata.gz: e211829d6c4b1d32cc37289942ee8d17446a5156
4
+ data.tar.gz: 8c799d0ad9cb0c1283c999cb56e4a8e8907d914f
5
5
  SHA512:
6
- metadata.gz: d8e92b350b78e52843d511b4cb81cacaec67fbb74858911171f0b0d766be82e5776dcb90a6f672f16dd0d8eead0e5ccca6a28bf79111c73160019ec58ae9556b
7
- data.tar.gz: d1c224e1a7246ed9ea0436b227f78244d1b5f5e748ca99ec9bfa2e3319bddff9b597ac9952c3eece51f17f1095582569df620a0ba01da347648262902b053011
6
+ metadata.gz: 67ad4215200274f2c40314d3792131b30c71c2a9845f8ec175f9e772c83aaaab86618a697c9de7fcc1f56fef705a9b969b5352ebefd30e8757011e98073a2f2a
7
+ data.tar.gz: e4fe122ff8901fe907f9b5dc057179770348d5d51e954c405e756fa3d7b75d07c606cb71e96381a6e9b58c1a030b13b385bb10c45ab85e0fd92b81a56f36f5f0
data/README.md CHANGED
@@ -450,6 +450,8 @@ On the Checkout page (`effective_orders.new_order_path`) a new `Effective::Order
450
450
 
451
451
  If the configuration options `config.require_billing_address` and/or `config.require_shipping_address` options are `true` then the user will be prompted for the appropriate addresses, based on [effective_addresses](https://github.com/code-and-effect/effective_addresses/).
452
452
 
453
+ If `config.use_address_full_name` is set to `true` then appropriate form field will be shown and the user will be prompted for the appropriate address full name during the checkout process, based on [effective_addresses](https://github.com/code-and-effect/effective_addresses/).
454
+
453
455
  As well, if the config option `config.collect_user_fields` is present, form fields to collect those user attributes will be present on this page.
454
456
 
455
457
  When the user submits the form on this screen, a POST to `effective_orders.order_path` is made, and the `Effective::Order` object is validated and created.
@@ -6,7 +6,7 @@ module Effective
6
6
  acts_as_obfuscated :format => '###-####-###'
7
7
  end
8
8
 
9
- acts_as_addressable :billing => {:singular => true, :presence => EffectiveOrders.require_billing_address, :use_full_name => true}, :shipping => {:singular => true, :presence => EffectiveOrders.require_shipping_address, :use_full_name => true}
9
+ acts_as_addressable :billing => {:singular => true, :presence => EffectiveOrders.require_billing_address, :use_full_name => EffectiveOrders.use_address_full_name}, :shipping => {:singular => true, :presence => EffectiveOrders.require_shipping_address, :use_full_name => EffectiveOrders.use_address_full_name}
10
10
  attr_accessor :save_billing_address, :save_shipping_address, :shipping_address_same_as_billing # save these addresses to the user if selected
11
11
 
12
12
  belongs_to :user # This is the user who purchased the order
@@ -29,6 +29,7 @@ module EffectiveOrders
29
29
 
30
30
  mattr_accessor :require_billing_address
31
31
  mattr_accessor :require_shipping_address
32
+ mattr_accessor :use_address_full_name
32
33
 
33
34
  mattr_accessor :collect_user_fields
34
35
  mattr_accessor :skip_user_validation
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.3.9'.freeze
2
+ VERSION = '1.3.10'.freeze
3
3
  end
@@ -43,6 +43,10 @@ EffectiveOrders.setup do |config|
43
43
  config.require_billing_address = true
44
44
  config.require_shipping_address = false
45
45
 
46
+ # Use billing/shipping address full name in checkout process. Address full name will be validated.
47
+ # Works with effective_addresses gem
48
+ config.use_address_full_name = true
49
+
46
50
  # If set, the orders#new screen will render effective/orders/user_fields partial and capture this User Info
47
51
  # The partial can be overridden to customize the form, but the following fields are also fed into strong_paramters
48
52
  config.collect_user_fields = []
@@ -43,6 +43,10 @@ EffectiveOrders.setup do |config|
43
43
  config.require_billing_address = true
44
44
  config.require_shipping_address = true
45
45
 
46
+ # Use billing/shipping address full name in checkout process. Address full name will be validated.
47
+ # Works with effective_addresses gem
48
+ config.use_address_full_name = true
49
+
46
50
  # If set, the orders#new screen will render effective/orders/user_fields partial and capture this User Info
47
51
  # The partial can be overridden to customize the form, but the following fields are also fed into strong_paramters
48
52
  config.collect_user_fields = [:first_name, :last_name]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.9
4
+ version: 1.3.10
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-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails