Skip to content

Commit e726dbc

Browse files
authored
Merge pull request rails#47838 from p8/docs/headers-activemodel2
Fix more missing Active Model documentation headers
2 parents 8992240 + 62c6cb3 commit e726dbc

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

activemodel/lib/active_model/error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "active_support/core_ext/class/attribute"
44

55
module ActiveModel
6-
# == Active \Model \Error
6+
# = Active \Model \Error
77
#
88
# Represents one single error
99
class Error

activemodel/lib/active_model/errors.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,8 @@ def normalize_arguments(attribute, type, **options)
472472
end
473473
end
474474

475+
# = Active \Model \Validator
476+
#
475477
# Raised when a validation cannot be corrected by end users and are considered
476478
# exceptional.
477479
#
@@ -490,10 +492,14 @@ def normalize_arguments(attribute, type, **options)
490492
class StrictValidationFailed < StandardError
491493
end
492494

495+
# = Active \Model \RangeError
496+
#
493497
# Raised when attribute values are out of range.
494498
class RangeError < ::RangeError
495499
end
496500

501+
# = Active \Model \UnknownAttributeError
502+
#
497503
# Raised when unknown attributes are supplied via mass assignment.
498504
#
499505
# class Person

activemodel/lib/active_model/forbidden_attributes_protection.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# frozen_string_literal: true
22

33
module ActiveModel
4+
# = Active \Model \ForbiddenAttributesError
5+
#
46
# Raised when forbidden attributes are used for mass assignment.
57
#
68
# class Person < ActiveRecord::Base

activemodel/lib/active_model/validator.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def validate(record)
124124
end
125125
end
126126

127+
# = Active \Model \EachValidator
128+
#
127129
# +EachValidator+ is a validator which iterates through the attributes given
128130
# in the options hash invoking the <tt>validate_each</tt> method passing in the
129131
# record, attribute, and value.

0 commit comments

Comments
 (0)