redis_page 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/redis_page/sweeper.rb +1 -0
- data/lib/redis_page/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60fbc716751fa3131863af257f790baf4c3a9d5d
|
4
|
+
data.tar.gz: 45a0c20f1786063effec108fa7e7b8d01bfd05f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c05ec1574cc3f302e31a1ec4ec6dd774e0a0c658fb7dc32a3c6eba9f2bcd8f2a1e0d2bd045de18af5a8d4e84ce446e9173a3e04a287782c1d0fec0d9719b370
|
7
|
+
data.tar.gz: a87be8a419d764784b9c46584c8e25c70368971438313ea5bc3196e3c70f436adaf8412dee0e6da785bdf4b987ff246fa7572379963ed957bf32736aca6a847f
|
data/README.md
CHANGED
@@ -84,6 +84,20 @@ class Product < ActiveRecord::Base
|
|
84
84
|
end
|
85
85
|
```
|
86
86
|
|
87
|
+
### 5. Collection
|
88
|
+
|
89
|
+
删除子记录时要触发父记录更新
|
90
|
+
|
91
|
+
```
|
92
|
+
collection.products.delete product
|
93
|
+
```
|
94
|
+
|
95
|
+
在父记录的 model 关系中增加 after_remove,触发父记录更新
|
96
|
+
|
97
|
+
```
|
98
|
+
has_many :products, through: :collections_products, after_remove: proc { |a| a.touch }
|
99
|
+
```
|
100
|
+
|
87
101
|
## Contribution
|
88
102
|
|
89
103
|
```
|
data/lib/redis_page/sweeper.rb
CHANGED
data/lib/redis_page/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_page
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saberma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|