draft_punk 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/draft_punk-0.2.1.gem +0 -0
- data/lib/activerecord_class_methods.rb +1 -1
- data/lib/draft_punk/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df330931e6469812ea46e1d7a5a329ea61ef3a3
|
4
|
+
data.tar.gz: 11ff17e689452b618af61d49ac19673f72f51073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8cc23363814f1bfd590b9cc9d339bc8392c5f9a8411bcc6e3b2f2451ae4d3577dfcb40bbf7705775829b64307da131a21f876098eee0e9665cef0a6ab427cf
|
7
|
+
data.tar.gz: c8e2d12c265c99fea4994fea3ed5a75c7b519e0454d8f352086fe88aa23c45fbfb66c618146d43583e04f5c397aa3fbfc2fc30c4f2ead520e1c22308aad1b355
|
Binary file
|
@@ -161,7 +161,7 @@ module DraftPunk
|
|
161
161
|
target_class.has_one :draft, class_name: target_class.name, foreign_key: :approved_version_id, unscoped: true
|
162
162
|
target_class.scope :approved, -> { where("#{target_class.quoted_table_name}.approved_version_id IS NULL") }
|
163
163
|
if set_default_scope
|
164
|
-
target_class.default_scope
|
164
|
+
target_class.default_scope -> { approved }
|
165
165
|
else
|
166
166
|
# TODO: fix - the unscoped isn't working with default scope, so not defining this draft scope if set_default_scope
|
167
167
|
target_class.scope :draft, -> { unscoped.where("#{target_class.quoted_table_name}.approved_version_id IS NOT NULL") }
|
data/lib/draft_punk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: draft_punk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Hodges
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amoeba
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- bin/setup
|
169
169
|
- draft_punk-0.1.0.gem
|
170
170
|
- draft_punk-0.2.0.gem
|
171
|
+
- draft_punk-0.2.1.gem
|
171
172
|
- draft_punk.gemspec
|
172
173
|
- lib/activerecord_class_methods.rb
|
173
174
|
- lib/activerecord_instance_methods.rb
|