activemodel 5.0.2 → 5.0.3
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/CHANGELOG.md +12 -0
- data/lib/active_model/errors.rb +1 -1
- data/lib/active_model/gem_version.rb +1 -1
- data/lib/active_model/type/string.rb +8 -3
- data/lib/active_model/validations/numericality.rb +1 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2da6af23ed9b706fd8216e7c548297e7692bdb1a
|
4
|
+
data.tar.gz: fe2ff2e94c8be6842c048e5ee0a2296c5ec2cffe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecd3c66ca0a85491aba53dc96ec13ab73f8d38184faa10a84a417b0d9ff2232637642a7c5d0ee3db23e138c6fdeac7e3ff95edeefca368beacb69ef01227c31e
|
7
|
+
data.tar.gz: 31c5352e19ceb3182def9fd945048f994a3aae304502ba773c7a2f452c246ec0ca9b7d9ba410fd6e2b4dd80a116566b87cf21c007dddc118a908ebe7693980ba
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
* The original string assigned to a model attribute is no longer incorrectly
|
2
|
+
frozen.
|
3
|
+
|
4
|
+
Fixes #24185, #28718.
|
5
|
+
|
6
|
+
*Matthew Draper*
|
7
|
+
|
8
|
+
* Avoid converting integer as a string into float.
|
9
|
+
|
10
|
+
*namusyaka*
|
11
|
+
|
12
|
+
|
1
13
|
## Rails 5.0.2 (March 01, 2017) ##
|
2
14
|
|
3
15
|
* No changes.
|
data/lib/active_model/errors.rb
CHANGED
@@ -11,9 +11,14 @@ module ActiveModel
|
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
def cast_value(value)
|
15
|
+
case value
|
16
|
+
when ::String then ::String.new(value)
|
17
|
+
when true then "t".freeze
|
18
|
+
when false then "f".freeze
|
19
|
+
else value.to_s
|
20
|
+
end
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.
|
26
|
+
version: 5.0.3
|
27
27
|
description: A toolkit for building modeling frameworks like Active Record. Rich support
|
28
28
|
for attributes, callbacks, validations, serialization, internationalization, and
|
29
29
|
testing.
|
@@ -118,3 +118,4 @@ signing_key:
|
|
118
118
|
specification_version: 4
|
119
119
|
summary: A toolkit for building modeling frameworks (part of Rails).
|
120
120
|
test_files: []
|
121
|
+
has_rdoc:
|