activemodel 5.0.0.beta4 → 5.0.0.racecar1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -4
- data/lib/active_model.rb +1 -0
- data/lib/active_model/errors.rb +4 -0
- data/lib/active_model/gem_version.rb +1 -1
- data/lib/active_model/type/integer.rb +1 -1
- data/lib/active_model/validations/acceptance.rb +1 -5
- data/lib/active_model/validator.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd003223e187a32f58824d78ece0a67e396fe45e
|
4
|
+
data.tar.gz: 7de681ddb7575f456d11ede95bedd5f40e35652c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce0eb2ac90f1feeb25eeb7b577f036f9cd1fb12124c83a17a0b0050b93048a8a301336bd8c94fa51452d48756379923256c609383d585cedd73fff8d8925bf8
|
7
|
+
data.tar.gz: 166e02c1be2aac431b3b77c5f0fbd803408e5bb6e927f1d61bd40cf57b94644b2e21aaf753f7718357b350e6d3d5771b6c76000bec06c01af1db702552b04453
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## Rails 5.0.0.rc1 (May 06, 2016) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
1
6
|
## Rails 5.0.0.beta4 (April 27, 2016) ##
|
2
7
|
|
3
8
|
* Allow passing record being validated to the message proc to generate
|
@@ -123,11 +128,13 @@
|
|
123
128
|
|
124
129
|
*Wojciech Wnętrzak*
|
125
130
|
|
126
|
-
* Change validates_acceptance_of to accept true by default
|
131
|
+
* Change `validates_acceptance_of` to accept `true` by default besides `'1'`.
|
132
|
+
|
133
|
+
The default for `validates_acceptance_of` is now `'1'` and `true`.
|
134
|
+
In the past, only `"1"` was the default and you were required to pass
|
135
|
+
`accept: true` separately.
|
127
136
|
|
128
|
-
|
129
|
-
In the past, only "1" was the default and you were required to add
|
130
|
-
accept: true.
|
137
|
+
*mokhan*
|
131
138
|
|
132
139
|
* Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and
|
133
140
|
`ActiveModel::Dirty#reset_changes`.
|
data/lib/active_model.rb
CHANGED
data/lib/active_model/errors.rb
CHANGED
@@ -526,6 +526,10 @@ module ActiveModel
|
|
526
526
|
class StrictValidationFailed < StandardError
|
527
527
|
end
|
528
528
|
|
529
|
+
# Raised when attribute values are out of range.
|
530
|
+
class RangeError < ::RangeError
|
531
|
+
end
|
532
|
+
|
529
533
|
# Raised when unknown attributes are supplied via mass assignment.
|
530
534
|
class UnknownAttributeError < NoMethodError
|
531
535
|
attr_reader :record, :attribute
|
@@ -46,7 +46,7 @@ module ActiveModel
|
|
46
46
|
|
47
47
|
def ensure_in_range(value)
|
48
48
|
unless range.cover?(value)
|
49
|
-
raise RangeError, "#{value} is out of range for #{self.class} with limit #{_limit}"
|
49
|
+
raise ActiveModel::RangeError, "#{value} is out of range for #{self.class} with limit #{_limit}"
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -100,7 +100,7 @@ module ActiveModel
|
|
100
100
|
# PresenceValidator.kind # => :presence
|
101
101
|
# UniquenessValidator.kind # => :uniqueness
|
102
102
|
def self.kind
|
103
|
-
@kind ||= name.split('::').last.underscore.
|
103
|
+
@kind ||= name.split('::').last.underscore.chomp('_validator').to_sym unless anonymous?
|
104
104
|
end
|
105
105
|
|
106
106
|
# Accepts options that will be made available through the +options+ reader.
|
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.0.
|
4
|
+
version: 5.0.0.racecar1
|
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: 2016-
|
11
|
+
date: 2016-05-06 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.0.
|
19
|
+
version: 5.0.0.racecar1
|
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.0.
|
26
|
+
version: 5.0.0.racecar1
|
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.
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: 1.3.1
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.5.1
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: A toolkit for building modeling frameworks (part of Rails).
|