effective_orders 1.3.9 → 1.3.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e211829d6c4b1d32cc37289942ee8d17446a5156
|
4
|
+
data.tar.gz: 8c799d0ad9cb0c1283c999cb56e4a8e8907d914f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =>
|
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
|
data/lib/effective_orders.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|