Skip to content

Commit 9dbf7a5

Browse files
Fix formatting of parameters doc [ci-skip]
1 parent a801aa7 commit 9dbf7a5

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ module ClassMethods
111111
#
112112
# Valid Options:
113113
#
114-
# * <tt>:only/:except</tt> - Only apply forgery protection to a subset of actions. For example <tt>only: [ :create, :create_all ]</tt>.
115-
# * <tt>:if/:unless</tt> - Turn off the forgery protection entirely depending on the passed Proc or method reference.
114+
# * <tt>:only</tt> / <tt>:except</tt> - Only apply forgery protection to a subset of actions. For example <tt>only: [ :create, :create_all ]</tt>.
115+
# * <tt>:if</tt> / <tt>:unless</tt> - Turn off the forgery protection entirely depending on the passed Proc or method reference.
116116
# * <tt>:prepend</tt> - By default, the verification of the authentication token will be added at the position of the
117117
# protect_from_forgery call in your application. This means any callbacks added before are run first. This is useful
118118
# when you want your forgery protection to depend on other callbacks, like authentication methods (Oauth vs Cookie auth).

actionview/lib/action_view/helpers/form_options_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = :
598598
#
599599
# Options:
600600
# * <tt>:index_as_value</tt> - Defaults to false, set to true to use the indexes from
601-
# <tt>I18n.translate("date.day_names")</tt> as the values. By default, Sunday is always 0.
601+
# <tt>I18n.translate("date.day_names")</tt> as the values. By default, Sunday is always 0.
602602
# * <tt>:day_format</tt> - The I18n key of the array to use for the weekday options.
603-
# Defaults to +:day_names+, set to +:abbr_day_names+ for abbreviations.
603+
# Defaults to +:day_names+, set to +:abbr_day_names+ for abbreviations.
604604
# * <tt>:beginning_of_week</tt> - Defaults to Date.beginning_of_week.
605605
#
606606
# NOTE: Only the option tags are returned, you have to wrap this call in

activemodel/lib/active_model/errors.rb

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ def initialize_dup(other) # :nodoc:
102102
# Copies the errors from <tt>other</tt>.
103103
# For copying errors but keep <tt>@base</tt> as is.
104104
#
105-
# other - The ActiveModel::Errors instance.
105+
# ==== Parameters
106106
#
107-
# Examples
107+
# * +other+ - The ActiveModel::Errors instance.
108+
#
109+
# ==== Examples
108110
#
109111
# person.errors.copy!(other)
112+
#
110113
def copy!(other) # :nodoc:
111114
@errors = other.errors.deep_dup
112115
@errors.each { |error|
@@ -119,9 +122,10 @@ def copy!(other) # :nodoc:
119122
# providing access to original error object.
120123
# If attribute or type needs to be overridden, use +override_options+.
121124
#
122-
# override_options - Hash
123-
# @option override_options [Symbol] :attribute Override the attribute the error belongs to.
124-
# @option override_options [Symbol] :type Override type of the error.
125+
# ==== Options
126+
#
127+
# * +:attribute+ - Override the attribute the error belongs to.
128+
# * +:type+ - Override type of the error.
125129
def import(error, override_options = {})
126130
[:attribute, :type].each do |key|
127131
if override_options.key?(key)
@@ -134,11 +138,14 @@ def import(error, override_options = {})
134138
# Merges the errors from <tt>other</tt>,
135139
# each <tt>Error</tt> wrapped as <tt>NestedError</tt>.
136140
#
137-
# other - The ActiveModel::Errors instance.
141+
# ==== Parameters
138142
#
139-
# Examples
143+
# * +other+ - The ActiveModel::Errors instance.
144+
#
145+
# ==== Examples
140146
#
141147
# person.errors.merge!(other)
148+
#
142149
def merge!(other)
143150
return errors if equal?(other)
144151

activerecord/lib/active_record/migration.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,9 @@ def up_only(&block)
817817

818818
# Runs the given migration classes.
819819
# Last argument can specify options:
820-
# - +:direction+ (default is +:up+)
821-
# - +:revert+ (default is +false+)
820+
#
821+
# - +:direction+ - Default is +:up+.
822+
# - +:revert+ - Default is +false+.
822823
def run(*migration_classes)
823824
opts = migration_classes.extract_options!
824825
dir = opts[:direction] || :up

0 commit comments

Comments
 (0)