unidom-price 1.0.1 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/app/models/unidom/price/concerns/as_priced.rb +14 -0
- data/app/models/unidom/price/concerns/as_pricer.rb +14 -0
- data/lib/unidom/price/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1b3bfa256196866e0c121411789815360c50d5
|
4
|
+
data.tar.gz: 1a614f382c7c1a40d44afdf341b08ce26ea92313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b46a6f6baa45b54de4ce80af9035cd85b16ab5f689c388bf6bf658c84021d92c693c4bb8832578ce9c6d4726b4a81ba906c9ce02c045f7ead620925a13cbb6f5
|
7
|
+
data.tar.gz: e252e804530a7b49ce1a1c5c6d0fd8176388134aacc40883bb4dc0703a56a3c23fcfdcd3abdca08cbeac11b8acaacc4e07e8a3d7c75092e7a9b7d999cb640512
|
data/README.md
CHANGED
@@ -53,3 +53,19 @@ prices = Unidom::Price::Price.priced_is(product).priced_by(pricer).charging_code
|
|
53
53
|
# Price a product
|
54
54
|
Unidom::Price::Price.price! product, amount: 100
|
55
55
|
```
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
## Include the Concerns
|
60
|
+
```ruby
|
61
|
+
include Unidom::Price::Concerns::AsPriced
|
62
|
+
include Unidom::Price::Concerns::AsPricer
|
63
|
+
```
|
64
|
+
|
65
|
+
### As Priced
|
66
|
+
The As Priced concern do the following tasks for the includer automatically:
|
67
|
+
1. Define the has_many :prices macro as: ``has_many :prices, class_name: 'Unidom::Price::Price', as: :priced``
|
68
|
+
|
69
|
+
### As Pricer
|
70
|
+
The As Priced concern do the following tasks for the includer automatically:
|
71
|
+
1. Define the has_many :pricings macro as: ``has_many :pricings, class_name: 'Unidom::Price::Price', as: :pricer``
|
data/lib/unidom/price/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-price
|
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
|
@@ -39,6 +39,8 @@ files:
|
|
39
39
|
- app/assets/stylesheets/unidom/price/application.css
|
40
40
|
- app/controllers/unidom/price/application_controller.rb
|
41
41
|
- app/helpers/unidom/price/application_helper.rb
|
42
|
+
- app/models/unidom/price/concerns/as_priced.rb
|
43
|
+
- app/models/unidom/price/concerns/as_pricer.rb
|
42
44
|
- app/models/unidom/price/price.rb
|
43
45
|
- app/views/layouts/unidom/price/application.html.erb
|
44
46
|
- config/routes.rb
|