deleted_at 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: bc6d9d446fa6477a7eb22388a7a668a0f4871d79
4
- data.tar.gz: de7b054ea2f46a01753866b88d84bc8184e449f1
3
+ metadata.gz: f0dbd1191992d563691e2cb03bfacfafcb308b12
4
+ data.tar.gz: e1b31685bc435d6cf3e9d5ce60266a8a03b620c0
5
5
  SHA512:
6
- metadata.gz: 9915eebda6fc0c1309f201b5b88f77f65b8e898cd21a1053c3afb75bcd9ae3169b5c6e3fcdada8cafb7fb2c9518602aef847d1124576bf1c2864dcf0d95455d1
7
- data.tar.gz: 6bcfda4d08f1f875d783b2958c2e63260e2dd9c91a30693a3f5c46b7465fe2b86cc0ddc488159da3def7ca0571a4c8bbd17ca37c308ab2668ea83da413cc8e5f
6
+ metadata.gz: a1795c5da2dd398338630cfd73e73c48d87e492f48b578ba2bb69b106f827f89cb05be7a5fb8011abd9648a0c95885666809dc6a404f1180e32a54f07068872b
7
+ data.tar.gz: 4df3ac496604622b1058784f4da4381d7ba87cf411145a6171126a74f72f99091c49bafe25305bc6785e17a7db2e706b6421d0fbada7ffc1892be7becdf53850
@@ -16,11 +16,21 @@ module DeletedAt
16
16
  false
17
17
  end
18
18
  end
19
+ alias_method_chain :create, :deleted_at
19
20
  end
21
+
20
22
  end
21
23
 
22
24
  module ClassMethods
23
25
 
26
+ def create_with_deleted_at(attributes = nil, &block)
27
+ if archive_with_deleted_at?
28
+ const_get(:All).create_without_deleted_at(attributes, &block)
29
+ else
30
+ create_without_deleted_at
31
+ end
32
+ end
33
+
24
34
  def with_deleted_at(options={})
25
35
 
26
36
  parse_options(options)
@@ -1,3 +1,3 @@
1
1
  module DeletedAt
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deleted_at
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
  - Dale Stevens