nxt_support 0.6.1 → 0.6.2

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
  SHA256:
3
- metadata.gz: a56ccf2cd98ff0c8f6c75b4e54ff8e89b59aadfc86476ad1b0a91e9ce7c1fef5
4
- data.tar.gz: d55f9511586bce10860b52f5188460346359c6e352056f1477dbb455595f0946
3
+ metadata.gz: e8b3ca68f9a536c651b5e6dcbe23ca93353e751a6e82b0dfe8cc34c2fe5f2e6b
4
+ data.tar.gz: d000a20b0f8c8036bb6b92736429214c4a575031dca1ca2bf0131011e0dbf450
5
5
  SHA512:
6
- metadata.gz: ffd4890cb7f2fb0c78e5ae058aa7bfdbc22564dd33c31ae888700083a6b785e573b18defc021b646fe63c7936d73b0c7ba927143394e845e6dac17c53b2d5168
7
- data.tar.gz: 20e6ddc394861312d81d3be126c835390e0d1240e671e4fad1607a6e8a99f658f2dcff0f8594944d61c2696b680379f8a76fc0ed4f156dc0f20b9d0ea17d1df5
6
+ metadata.gz: 6183e37bab247fb40afee92b55c695b233428b91cadcfd30a6f36df07ba8856f72859cddebba385f70c16afe0e789306505fe69c809ef8852de8e2b241db981a
7
+ data.tar.gz: 8a9405cd61a678f51510dfdf97a986d017fd3fb399e4c0aa56358245601ba0670621f81e5a32df912b4c1b1c489436dd98e4a2516871cfd173f2e9786cfe4535
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.6.2 2026-04-30
2
+ - Fix `.validate_duration` and `.validates_durations` when used in combination with `duration_attribute_accessor`
3
+
1
4
  # v0.6.1 2026-04-30
2
5
  - Added `.validate_duration` and `.validates_durations` to `NxtSupport::DurationAttributeAccessor`
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_support (0.6.1)
4
+ nxt_support (0.6.2)
5
5
  activerecord
6
6
  activesupport
7
7
  nxt_init
@@ -22,7 +22,9 @@ module NxtSupport
22
22
 
23
23
  def validates_durations(*attrs, **opts)
24
24
  validates_each(*attrs, **opts) do |record, attr, value|
25
- record.errors.add attr, "is not a valid iso8601 duration." unless record.is_valid_iso8601_duration?(value)
25
+ next if value.is_a?(ActiveSupport::Duration)
26
+ next if record.is_valid_iso8601_duration?(value)
27
+ record.errors.add attr, "is not a valid iso8601 duration."
26
28
  end
27
29
  end
28
30
 
@@ -1,3 +1,3 @@
1
1
  module NxtSupport
2
- VERSION = "0.6.1".freeze
2
+ VERSION = "0.6.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Sommer