mongoid_silo 0.2.0 → 0.2.1
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.
- data/README.md +6 -0
- data/lib/mongoid_silo/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -34,6 +34,12 @@ silo
|
|
34
34
|
# Or you can specify the silo name and the class that will be called to populate it, like so...
|
35
35
|
silo :feed, generator: "MyGeneratorClass"
|
36
36
|
|
37
|
+
# You can now pass a block to the constructor, and declare child classes that will cause this silo to be updated:
|
38
|
+
silo :feed do |config|
|
39
|
+
config.generator = "MyGeneratorClass"
|
40
|
+
config.dependents << {class_name: "OtherClass", foreign_key: "my_class_id"}
|
41
|
+
end
|
42
|
+
|
37
43
|
# To create a custom generator class, simply inherit from MongoidSilo::GrainBelt and override the
|
38
44
|
# generate method.
|
39
45
|
class MyGeneratorClass < MongoidSilo::GrainBelt
|
data/lib/mongoid_silo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_silo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|