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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fddca64fb0fec2fbd036d72077325a002880594
4
- data.tar.gz: 516976c7f9f7c785e83a7fd81c10641aea80e73b
3
+ metadata.gz: 8df330931e6469812ea46e1d7a5a329ea61ef3a3
4
+ data.tar.gz: 11ff17e689452b618af61d49ac19673f72f51073
5
5
  SHA512:
6
- metadata.gz: ea2afcb3df793c37339294cc2435c837fec895d4e9b652c32caee2bb37628e22222a87c211ed4f4afcd69ce5fa1290838da1d3180b9f853a1ae519b4b2d202c6
7
- data.tar.gz: e3b90b801452af2563a4c8152890e2d72a5802467ea584766a0524155ccd39b888c53649f203b08420777dd08ce48ddcac44652ff789332ae3789a5e7e523211
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 target_class.approved
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") }
@@ -1,3 +1,3 @@
1
1
  module DraftPunk
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-19 00:00:00.000000000 Z
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