active_type 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.5.2.mysql2.lock +2 -2
- data/Gemfile.5.2.pg.lock +1 -1
- data/Gemfile.5.2.sqlite3.lock +2 -2
- data/Gemfile.6.0.sqlite3.lock +2 -2
- data/Gemfile.6.1.pg.lock +2 -2
- data/Gemfile.6.1.sqlite3.lock +2 -2
- data/Gemfile.7.0.pg.lock +1 -1
- data/Gemfile.7.0.sqlite3.lock +1 -1
- data/lib/active_type/nested_attributes/association.rb +9 -5
- data/lib/active_type/version.rb +1 -1
- data/lib/active_type/virtual_attributes.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40083adc49f1500ec21e7e2febbca83a4757bc7daf87c3f5e8a1edb31c242502
|
4
|
+
data.tar.gz: 2a801dc75197b91f61a40f0a06de9f96d743cd092004c6426dabeeceb2787ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9b8c4b430b352bc0f178354fe43685a19e1fbd24cf8c6fdff0ce18713f97afa682051dcd2dabdf670769d79b24fb760ec9a573d0e312803ce2d887fef04a874
|
7
|
+
data.tar.gz: 6f4bda1b9867f569a5269edae81351e59ad0a1eb4b021aeb14735aa23dafca5ce1321236557c7c007fa8632ad1671c6881aab6b06fc429d62392d95d462ce6bc
|
data/Gemfile.5.2.mysql2.lock
CHANGED
data/Gemfile.5.2.pg.lock
CHANGED
data/Gemfile.5.2.sqlite3.lock
CHANGED
data/Gemfile.6.0.sqlite3.lock
CHANGED
data/Gemfile.6.1.pg.lock
CHANGED
data/Gemfile.6.1.sqlite3.lock
CHANGED
data/Gemfile.7.0.pg.lock
CHANGED
data/Gemfile.7.0.sqlite3.lock
CHANGED
@@ -16,11 +16,15 @@ module ActiveType
|
|
16
16
|
@allow_destroy = options.fetch(:allow_destroy, false)
|
17
17
|
@reject_if = options.delete(:reject_if)
|
18
18
|
@options = options.dup
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
|
20
|
+
@index_errors = case
|
21
|
+
when ActiveRecord::VERSION::MAJOR < 5
|
22
|
+
@options[:index_errors]
|
23
|
+
when ActiveRecord::VERSION::MAJOR < 7
|
24
|
+
@options[:index_errors] || ActiveRecord::Base.index_nested_attribute_errors
|
25
|
+
else
|
26
|
+
@options[:index_errors] || ActiveRecord.index_nested_attribute_errors
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
def assign_attributes(parent, attributes)
|
data/lib/active_type/version.rb
CHANGED
@@ -273,7 +273,7 @@ module ActiveType
|
|
273
273
|
if value.is_a?(String) && value.length > 50
|
274
274
|
"#{value[0, 50]}...".inspect
|
275
275
|
elsif value.is_a?(Date) || value.is_a?(Time)
|
276
|
-
%("#{value.
|
276
|
+
%("#{value.to_formatted_s(:db)}")
|
277
277
|
elsif value.is_a?(Array) && value.size > 10
|
278
278
|
inspected = value.first(10).inspect
|
279
279
|
%(#{inspected[0...-1]}, ...])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_type
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
134
|
+
rubygems_version: 3.1.6
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Make any Ruby object quack like ActiveRecord
|