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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5df9d369a3faa94a6d5fc38b04390262022f27d
4
- data.tar.gz: b9ee6b37708667d8d35b8dba1d56ea03f0248384
3
+ metadata.gz: cd003223e187a32f58824d78ece0a67e396fe45e
4
+ data.tar.gz: 7de681ddb7575f456d11ede95bedd5f40e35652c
5
5
  SHA512:
6
- metadata.gz: 58760c123352b90b58ec20cc8c1df1e6fcdcb006aed4cebbd91ea679ba3da46bd143616ab1912f2096749144601cc3b50b6eea3a9979ff0e9b75d8bae7598070
7
- data.tar.gz: d2003ffd49c49cdd016e7c73aa9d333d10f1c6d261939a1b39b6b7366412bb7c8922a784b3e0272469f7e6d67f821d7c5421d8b7c21b29fbc2224a1fffd73e0b
6
+ metadata.gz: 4ce0eb2ac90f1feeb25eeb7b577f036f9cd1fb12124c83a17a0b0050b93048a8a301336bd8c94fa51452d48756379923256c609383d585cedd73fff8d8925bf8
7
+ data.tar.gz: 166e02c1be2aac431b3b77c5f0fbd803408e5bb6e927f1d61bd40cf57b94644b2e21aaf753f7718357b350e6d3d5771b6c76000bec06c01af1db702552b04453
@@ -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
- The default for validates_acceptance_of is now "1" and true.
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`.
@@ -49,6 +49,7 @@ module ActiveModel
49
49
 
50
50
  eager_autoload do
51
51
  autoload :Errors
52
+ autoload :RangeError, 'active_model/errors'
52
53
  autoload :StrictValidationFailed, 'active_model/errors'
53
54
  autoload :UnknownAttributeError, 'active_model/errors'
54
55
  end
@@ -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
@@ -8,7 +8,7 @@ module ActiveModel
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 0
11
- PRE = "beta4"
11
+ PRE = "racecar1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -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
 
@@ -64,11 +64,7 @@ module ActiveModel
64
64
  private
65
65
 
66
66
  def convert_to_reader_name(method_name)
67
- attr_name = method_name.to_s
68
- if attr_name.end_with?("=")
69
- attr_name = attr_name[0..-2]
70
- end
71
- attr_name
67
+ method_name.to_s.chomp('=')
72
68
  end
73
69
  end
74
70
  end
@@ -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.sub(/_validator$/, '').to_sym unless anonymous?
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.beta4
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-04-27 00:00:00.000000000 Z
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.beta4
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.beta4
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.6.4
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).