drafting 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +3 -0
- data/lib/drafting/base_class_methods.rb +8 -2
- data/lib/drafting/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: 584bd74179c43b3e4a394351a2960d7bd61c95fa
|
4
|
+
data.tar.gz: 61be0d4f73ce8309d93c6469d6c891a45290c11a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42dc06da36af1230c2629e4907c23117e5e13092768d724c3a9b7b14f346a148a3154b6d3456768f6ba9e7f2deb8061a4ca0538736c08a8ab3e903bbf599425e
|
7
|
+
data.tar.gz: 5a6accada57fa8ea9d938634325491405a116b19faf12e678c434c0507ffd73a37dfb65beb1ec29b54c306952457415a736d07b32bc4720fb2e5b8fbe7a60d3b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -13,8 +13,14 @@ module Drafting
|
|
13
13
|
raise ArgumentError unless parent_class
|
14
14
|
|
15
15
|
unless parent_class.method_defined? :drafts
|
16
|
-
parent_class.
|
17
|
-
|
16
|
+
parent_class.class_eval do
|
17
|
+
def drafts(user)
|
18
|
+
Draft.where(:user => user, :parent => self)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.child_drafts(user)
|
22
|
+
Draft.where(:user => user, :parent_type => self)
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
data/lib/drafting/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drafting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|