servitium 1.3.4 → 1.3.5
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 +4 -4
- data/lib/servitium/rails8_value_dirty_compat.rb +20 -0
- data/lib/servitium/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a0ef3ad8b27e23da12fb7e38523b6791067182326c4eb687ff783c04590a48b
|
|
4
|
+
data.tar.gz: 7db9f17e28035c835626d7a95b53566fcc970cee967753666ad6651ca5553005
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21d99ac12c2a0b21d15c3344c1f25ccf01151a10516794485d7343e9d8b9940e7b555fc5fcd29c563c937d3810cd22cd747f551aca54d78db112a2dbc48c625e
|
|
7
|
+
data.tar.gz: d112f878db7d4f82e806d34805a80e5cd5cd28388d4e7a728f0c2b8d4e7af3cfb02fdbcf8b2a533977bc875d230b984ef1ef8151a4c904141c0656ccf3f8c4b7
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Rails 8 compatibility: ActiveModel::Dirty expects attribute values to respond to
|
|
4
|
+
# +changed_in_place?+. Value types (Integer, Float, Symbol, etc.) can't get
|
|
5
|
+
# singleton methods in Ruby, so we add the method at the class level here.
|
|
6
|
+
# Servitium/ActiveAttr context attributes use these types; without this, validations
|
|
7
|
+
# (e.g. NumericalityValidator) raise NoMethodError.
|
|
8
|
+
|
|
9
|
+
require "bigdecimal"
|
|
10
|
+
require "date"
|
|
11
|
+
|
|
12
|
+
[
|
|
13
|
+
String, Integer, Float, BigDecimal,
|
|
14
|
+
TrueClass, FalseClass, NilClass, Symbol,
|
|
15
|
+
Date, Time, Array, Hash
|
|
16
|
+
].each do |klass|
|
|
17
|
+
next if klass.method_defined?(:changed_in_place?)
|
|
18
|
+
|
|
19
|
+
klass.define_method(:changed_in_place?) { false }
|
|
20
|
+
end
|
data/lib/servitium/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: servitium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
@@ -281,6 +281,7 @@ files:
|
|
|
281
281
|
- lib/servitium/i18n.rb
|
|
282
282
|
- lib/servitium/rails.rb
|
|
283
283
|
- lib/servitium/rails/railtie.rb
|
|
284
|
+
- lib/servitium/rails8_value_dirty_compat.rb
|
|
284
285
|
- lib/servitium/scoped_attributes.rb
|
|
285
286
|
- lib/servitium/service.rb
|
|
286
287
|
- lib/servitium/service_active_job.rb
|