options_model 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_model/type/date_time.rb +4 -0
- data/lib/active_model/type/helpers/accepts_multiparameter_time.rb +4 -0
- data/lib/active_model/type/integer.rb +1 -1
- data/lib/active_model/type/value.rb +4 -0
- data/lib/active_model/type.rb +4 -0
- data/lib/options_model/version.rb +1 -1
- data/lib/options_model.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9a37f973ba728533048c53e9a2d775fc0456417
|
4
|
+
data.tar.gz: c8a02ff82bd787b11c48fa8a10e7b624b1fc0974
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f90a39308bd641d7960c743ed8d7708a15507a6acbce56f8bbc02356af78a461cd7fcc26aa29d7bc1430898eee146721a15a5e6d071ce7444744f6aa46390647
|
7
|
+
data.tar.gz: 275841f4c5a6dbd721d567fb2007f2959f233a6aa67a67e5ffeffb8aa876d27a9196a65428973ec7b44309a067c9afc8c49cc281517567d4d2a8f04a23d6b2bb
|
@@ -21,6 +21,10 @@ module ActiveModel
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
define_method(:value_constructed_by_mass_assignment?) do |value|
|
25
|
+
value.is_a?(Hash)
|
26
|
+
end
|
27
|
+
|
24
28
|
define_method(:value_from_multiparameter_assignment) do |values_hash|
|
25
29
|
defaults.each do |k, v|
|
26
30
|
values_hash[k] ||= v
|
data/lib/active_model/type.rb
CHANGED
data/lib/options_model.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "active_model"
|
4
|
-
require "active_model/type"
|
5
4
|
|
6
5
|
require "options_model/concerns/attribute_assignment"
|
7
6
|
require "options_model/concerns/attributes"
|
@@ -10,7 +9,7 @@ require "options_model/concerns/serialization"
|
|
10
9
|
|
11
10
|
require "options_model/base"
|
12
11
|
|
13
|
-
|
12
|
+
if ActiveModel.gem_version < Gem::Version.new("5.0.0")
|
14
13
|
require "active_model/type"
|
15
14
|
end
|
16
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: options_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jasl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|