unidom-shopping 1.0.1 → 1.1
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: 5249024e787de46a268dfc2f6f3870343e166c89
|
4
|
+
data.tar.gz: b8cece8d174069da706b18f7f4edb2c585ee95d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a4e13e2eba9853519f949e1ed27a205be55e4e2074c90cb3dd49638f2b8da92e1bdf35263fd99af0323cdcc09e96957f3314762b5b5e438c5eedd0d725d22a7
|
7
|
+
data.tar.gz: f3e73689c8c4ccbb3800041f240b8130e97289ebda0b02e17c6b37e2106426534de6c465392835642dc40c69410d0cda3d872595775ce09e1f52d4bd8935f927
|
data/README.md
CHANGED
@@ -41,3 +41,19 @@ shopping_cart.add! ball, unit_price: 19.99
|
|
41
41
|
shopping_cart = Unidom::Shopping::ShoppingCart.shopped_by(lady).shop_is(shop).valid_at.alive.first
|
42
42
|
shopping_cart.items.valid_at.alive # fish & ball
|
43
43
|
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
## Include the Concerns
|
48
|
+
```ruby
|
49
|
+
include Unidom::Shopping::Concerns::AsCartShopper
|
50
|
+
include Unidom::Shopping::Concerns::AsItemShopper
|
51
|
+
```
|
52
|
+
|
53
|
+
### As Cart Shopper
|
54
|
+
The As Cart Shopper concern do the following tasks for the includer automatically:
|
55
|
+
1. Define the has_many :shopping_carts macro as: ``has_many :shopping_carts, class_name: 'Unidom::Shopping::ShoppingCart', as: :shopper``
|
56
|
+
|
57
|
+
### As Item Shopper
|
58
|
+
The As Item Shopper concern do the following tasks for the includer automatically:
|
59
|
+
1. Define the has_many :shopping_items macro as: ``has_many :shopping_items, class_name: 'Unidom::Shopping::ShoppingItem', as: :shopper``
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-shopping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -40,6 +40,9 @@ files:
|
|
40
40
|
- app/assets/stylesheets/unidom/shopping/application.css
|
41
41
|
- app/controllers/unidom/shopping/application_controller.rb
|
42
42
|
- app/helpers/unidom/shopping/application_helper.rb
|
43
|
+
- app/models/unidom/shopping/concerns/as_cart_shopper.rb
|
44
|
+
- app/models/unidom/shopping/concerns/as_item_shopper.rb
|
45
|
+
- app/models/unidom/shopping/concerns/as_shopped.rb
|
43
46
|
- app/models/unidom/shopping/shopping_cart.rb
|
44
47
|
- app/models/unidom/shopping/shopping_item.rb
|
45
48
|
- app/views/layouts/unidom/shopping/application.html.erb
|