Skip to content

Commit

Permalink
Replace backticks with RDoc markup [ci-skip]
Browse files Browse the repository at this point in the history
RDoc does not support backticks the way that Markdown does.  Instead,
inline code must be wrapped with `+` or `<tt>`.
  • Loading branch information
jonathanhefner committed Feb 21, 2022
1 parent 0d3effc commit 07bee94
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/redirecting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class UnsafeRedirectError < StandardError; end
#
# Raises UnsafeRedirectError in the case of an unsafe redirect.
#
# To allow any external redirects pass `allow_other_host: true`, though using a user-provided param in that case is unsafe.
# To allow any external redirects pass <tt>allow_other_host: true</tt>, though using a user-provided param in that case is unsafe.
#
# redirect_to "https://rubyonrails.org", allow_other_host: true
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class Parameters
# By default, never raise an UnpermittedParameters exception if these
# params are present. The default includes both 'controller' and 'action'
# because they are added by Rails and should be of no concern. One way
# to change these is to specify `always_permitted_parameters` in your
# to change these is to specify +always_permitted_parameters+ in your
# config. For instance:
#
# config.action_controller.always_permitted_parameters = %w( controller action format )
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/helpers/form_options_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = :
#
# Options:
# * <tt>:index_as_value</tt> - Defaults to false, set to true to use the indexes from
# `I18n.translate("date.day_names")` as the values. By default, Sunday is always 0.
# <tt>I18n.translate("date.day_names")</tt> as the values. By default, Sunday is always 0.
# * <tt>:day_format</tt> - The I18n key of the array to use for the weekday options.
# Defaults to :day_names, set to :abbr_day_names for abbreviations.
# * <tt>:beginning_of_week</tt> - Defaults to Date.beginning_of_week.
Expand Down
2 changes: 1 addition & 1 deletion actionview/lib/action_view/helpers/tag_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def method_missing(called, *args, **options, &block)
# Transforms a Hash into HTML attributes, ready to be interpolated into
# ERB. Includes or omits boolean attributes based on their truthiness.
# Transforms keys nested within
# <tt>aria:</tt> or <tt>data:</tt> objects into `aria-` and `data-`
# <tt>aria:</tt> or <tt>data:</tt> objects into <tt>aria-</tt> and <tt>data-</tt>
# prefixed attributes:
#
# <input <%= tag.attributes(type: :text, aria: { label: "Search" }) %>>
Expand Down
8 changes: 4 additions & 4 deletions activerecord/lib/active_record/associations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,8 @@ module ClassMethods
# [:disable_joins]
# Specifies whether joins should be skipped for an association. If set to true, two or more queries
# will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory
# due to database limitations. This option is only applicable on `has_many :through` associations as
# `has_many` alone do not perform a join.
# due to database limitations. This option is only applicable on <tt>has_many :through</tt> associations as
# +has_many+ alone do not perform a join.
# [:source]
# Specifies the source association name used by #has_many <tt>:through</tt> queries.
# Only use it if the name cannot be inferred from the association.
Expand Down Expand Up @@ -1581,8 +1581,8 @@ def has_many(name, scope = nil, **options, &extension)
# [:disable_joins]
# Specifies whether joins should be skipped for an association. If set to true, two or more queries
# will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory
# due to database limitations. This option is only applicable on `has_one :through` associations as
# `has_one` alone does not perform a join.
# due to database limitations. This option is only applicable on <tt>has_one :through</tt> associations as
# +has_one+ alone does not perform a join.
# [:source]
# Specifies the source association name used by #has_one <tt>:through</tt> queries.
# Only use it if the name cannot be inferred from the association.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ def connection_class # :nodoc:
end

# The role (e.g. +:writing+) for the current connection. In a
# non-multi role application, `:writing` is returned.
# non-multi role application, +:writing+ is returned.
def role
@pool.role
end

# The shard (e.g. +:default+) for the current connection. In
# a non-sharded application, `:default` is returned.
# a non-sharded application, +:default+ is returned.
def shard
@pool.shard
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def new_client(conn_params)

##
# :singleton-method:
# PostgreSQL supports multiple types for DateTimes. By default, if you use `datetime`
# PostgreSQL supports multiple types for DateTimes. By default, if you use +datetime+
# in migrations, Rails will translate this to a PostgreSQL "timestamp without time zone".
# Change this in an initializer to use another NATIVE_DATABASE_TYPES. For example, to
# store DateTimes as "timestamp with time zone":
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.configurations
##
# :singleton-method:
# Force enumeration of all columns in SELECT statements.
# e.g. `SELECT first_name, last_name FROM ...` instead of `SELECT * FROM ...`
# e.g. <tt>SELECT first_name, last_name FROM ...</tt> instead of <tt>SELECT * FROM ...</tt>
# This avoids +PreparedStatementCacheExpired+ errors when a column is added
# to the database while the app is running.
class_attribute :enumerate_columns_in_select_statements, instance_accessor: false, default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module EncryptableRecord
# * <tt>:key</tt> - A password to derive the key from. It's a shorthand for a +:key_provider+ that
# serves derivated keys. Both options can't be used at the same time.
# * <tt>:key_provider</tt> - Set a +:key_provider+ to provide encryption and decryption keys. If not
# provided, it will default to the key provider set with `config.key_provider`.
# provided, it will default to the key provider set with +config.key_provider+.
# * <tt>:deterministic</tt> - By default, encryption is not deterministic. It will use a random
# initialization vector for each encryption operation. This means that encrypting the same content
# with the same key twice will generate different ciphertexts. When set to +true+, it will generate the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Encryption
#
# This provider can work with multiple master keys. It will use the last one for encrypting.
#
# When `config.store_key_references` is true, it will also store a reference to
# When +config.store_key_references+ is true, it will also store a reference to
# the specific master key that was used to encrypt the data-encryption key. When not set,
# it will try all the configured master keys looking for the right one, in order to
# return the right decryption key.
Expand Down
8 changes: 4 additions & 4 deletions activerecord/lib/active_record/middleware/shard_selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module Middleware
# shard to switch to and allows for applications to write custom strategies
# for swapping if needed.
#
# The ShardSelector takes a set of options (currently only `lock` is supported)
# that can be used by the middleware to alter behavior. `lock` is
# The ShardSelector takes a set of options (currently only +lock+ is supported)
# that can be used by the middleware to alter behavior. +lock+ is
# true by default and will prohibit the request from switching shards once
# inside the block. If `lock` is false, then shard swapping will be allowed.
# For tenant based sharding, `lock` should always be true to prevent application
# inside the block. If +lock+ is false, then shard swapping will be allowed.
# For tenant based sharding, +lock+ should always be true to prevent application
# code from mistakenly switching between tenants.
#
# Options can be set in the config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Like an ActiveStorage::Variant, but keeps detail about the variant in the database as an
# ActiveStorage::VariantRecord. This is only used if `ActiveStorage.track_variants` is enabled.
# ActiveStorage::VariantRecord. This is only used if +ActiveStorage.track_variants+ is enabled.
class ActiveStorage::VariantWithRecord
attr_reader :blob, :variation
delegate :service, to: :blob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Compatibility

# Change the output of <tt>ActiveSupport::TimeZone.utc_to_local</tt>.
#
# When `true`, it returns local times with a UTC offset, with `false` local
# When +true+, it returns local times with a UTC offset, with +false+ local
# times are returned as UTC.
#
# # Given this zone:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# of the module.
#
# Note that it can also be scoped per-fiber if Rails.application.config.active_support.isolation_level
# is set to `:fiber`.
# is set to +:fiber+.
class Module
# Defines a per-thread class attribute and creates class and instance reader methods.
# The underlying per-thread class variable is set to +nil+, if it is not previously defined.
Expand Down Expand Up @@ -118,7 +118,7 @@ def #{sym}=(obj)
# Account.user # => "DHH"
# Account.new.user # => "DHH"
#
# Unlike `mattr_accessor`, values are *not* shared with subclasses or parent classes.
# Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes.
# If a subclass changes the value, the parent class' value is not changed.
# If the parent class changes the value, the value of subclasses is not changed.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module ConstantStubbing
#
# assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD = 5000
#
# Using this method rather than forcing `World::List::Import::LARGE_IMPORT_THRESHOLD = 5000` prevents
# Using this method rather than forcing <tt>World::List::Import::LARGE_IMPORT_THRESHOLD = 5000</tt> prevents
# warnings from being thrown, and ensures that the old value is returned after the test has completed.
#
# Note: Stubbing a const will stub it across all threads. So if you have concurrent threads
Expand Down

0 comments on commit 07bee94

Please sign in to comment.