Skip to content

Commit 3a831fa

Browse files
Use h4 headings in method docs [ci-skip]
SDoc uses `h3` headings for method signatures, so to preserve heading hierarchy, method documentation should use `h4`, `h5`, or `h6`.
1 parent 836e380 commit 3a831fa

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

activerecord/lib/active_record/delegated_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ module DelegatedType
202202
# @entry.access_notice_message
203203
# @entry.access_notice_message?
204204
#
205-
# === Options
205+
# ==== Options
206206
#
207207
# The +options+ are passed directly to the +belongs_to+ call, so this is where you declare +dependent+ etc.
208208
# The following options can be included to specialize the behavior of the delegated type convenience methods.

activerecord/lib/active_record/encryption/encryptable_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module EncryptableRecord
1616
class_methods do
1717
# Encrypts the +name+ attribute.
1818
#
19-
# === Options
19+
# ==== Options
2020
#
2121
# * <tt>:key_provider</tt> - A key provider to provide encryption and decryption keys. Defaults to
2222
# +ActiveRecord::Encryption.key_provider+.

activerecord/lib/active_record/encryption/encrypted_attribute_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class EncryptedAttributeType < ::ActiveModel::Type::Value
1515
delegate :key_provider, :downcase?, :deterministic?, :previous_schemes, :with_context, :fixed?, to: :scheme
1616
delegate :accessor, :type, to: :cast_type
1717

18-
# === Options
18+
# ==== Options
1919
#
2020
# * <tt>:scheme</tt> - A +Scheme+ with the encryption properties for this attribute.
2121
# * <tt>:cast_type</tt> - A type that will be used to serialize (before encrypting) and deserialize

activerecord/lib/active_record/relation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def update_counters(counters)
969969
# If attribute names are passed, they are updated along with +updated_at+/+updated_on+ attributes.
970970
# If no time argument is passed, the current time is used as default.
971971
#
972-
# === Examples
972+
# ==== Examples
973973
#
974974
# # Touch all records
975975
# Person.all.touch_all

activerecord/lib/active_record/secure_token.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module ClassMethods
3030
# {validates_uniqueness_of}[rdoc-ref:Validations::ClassMethods#validates_uniqueness_of] can.
3131
# You're encouraged to add a unique index in the database to deal with this even more unlikely scenario.
3232
#
33-
# === Options
33+
# ==== Options
3434
#
3535
# [:length]
3636
# Length of the Secure Random, with a minimum of 24 characters. It will

activerecord/lib/active_record/signed_id.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def find_signed(signed_id, purpose: nil, on_rotation: nil)
7979
# or has been tampered with. It will also raise an +ActiveRecord::RecordNotFound+ exception if
8080
# the valid signed id can't find a record.
8181
#
82-
# === Examples
82+
# ==== Examples
8383
#
8484
# User.find_signed! "bad data" # => ActiveSupport::MessageVerifier::InvalidSignature
8585
#

activestorage/lib/active_storage/fixture_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FixtureSet
5050
# by ActiveSupport::Testing::FileFixtures.file_fixture, and upload
5151
# the file to the Service
5252
#
53-
# === Examples
53+
# ==== Examples
5454
#
5555
# # tests/fixtures/active_storage/blobs.yml
5656
# second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob(

activesupport/lib/active_support/core_ext/date_time/conversions.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class DateTime
1111
#
1212
# This method is aliased to <tt>to_formatted_s</tt>.
1313
#
14-
# === Examples
14+
# ==== Examples
15+
#
1516
# datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000
1617
#
1718
# datetime.to_fs(:db) # => "2007-12-04 00:00:00"
@@ -23,7 +24,8 @@ class DateTime
2324
# datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000"
2425
# datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00"
2526
#
26-
# == Adding your own datetime formats to to_fs
27+
# ==== Adding your own datetime formats to to_fs
28+
#
2729
# DateTime formats are shared with Time. You can add your own to the
2830
# Time::DATE_FORMATS hash. Use the format name as the hash key and
2931
# either a strftime string or Proc instance that takes a time or

0 commit comments

Comments
 (0)