boolean_timestamps 1.0.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4db42c2d9282049904daac549412e88bdcc2046a
4
- data.tar.gz: b9ef2170aa2065d375cff6d088294ded73497f71
3
+ metadata.gz: 442bea680df65a11e9ed2c2aeef1b012e0715148
4
+ data.tar.gz: b905d1f528710c5a2960822c404888da9dd93abc
5
5
  SHA512:
6
- metadata.gz: 74a0f2fa850da620f092f6a268a696d329250a3c8a0155a2866ee37a561fd01c3d0f34fc7025ffc29825b73ffb9310c2c159313e198011319a0a92382845ed79
7
- data.tar.gz: 524ae91962f06bfc92f43deae42c53a0c20525871b855a845194f277ded589fc709bfbb7037842e76fa966be3a2c5fa61c57ba3ba7c6aee04a675592291db104
6
+ metadata.gz: 86f16bdd3c0543e3ad7c16ac92f2c6147ddfbb7cdf1e810e8ccfe706958f5b0336a3b7ad55777c9acbab9787769961454da8d49a5d4baab3eb355716598d4682
7
+ data.tar.gz: d9a4ed74d18c4b461d56219bb2b66d0696a8302602e4ff8b8881039c87c590ecee5ce04a3ddcdd75919ff56943c60d7599b71c9327f1b050fa097f71a09f6fa7
@@ -16,7 +16,7 @@ module BooleanTimestamps
16
16
  send("#{timestamp_attribute}?")
17
17
  end
18
18
  define_method "#{boolean_attribute}=" do |value|
19
- boolean_value = ActiveRecord::Type::Boolean.new.type_cast(value)
19
+ boolean_value = ActiveRecord::Type::Boolean.new.cast(value)
20
20
  unless boolean_value && send("#{timestamp_attribute}?")
21
21
  timestamp = boolean_value ? Time.zone.now : nil
22
22
  send("#{timestamp_attribute}=", timestamp)
@@ -1,3 +1,3 @@
1
1
  module BooleanTimestamps
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boolean_timestamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BetterUp Developers