Skip to content

Commit a43db84

Browse files
Format ::define_attribute parameters as term list [ci-skip]
1 parent bfe28e2 commit a43db84

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

activerecord/lib/active_record/attributes.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,22 @@ module ClassMethods
218218
# is provided so it can be used by plugin authors, application code
219219
# should probably use ClassMethods#attribute.
220220
#
221-
# +name+ The name of the attribute being defined. Expected to be a +String+.
221+
# ==== Parameters
222222
#
223-
# +cast_type+ The type object to use for this attribute.
223+
# [+name+]
224+
# The name of the attribute being defined. Expected to be a +String+.
224225
#
225-
# +default+ The default value to use when no value is provided. If this option
226-
# is not passed, the previous default value (if any) will be used.
227-
# Otherwise, the default will be +nil+. A proc can also be passed, and
228-
# will be called once each time a new value is needed.
226+
# [+cast_type+]
227+
# The type object to use for this attribute.
228+
#
229+
# [+default+]
230+
# The default value to use when no value is provided. If this option
231+
# is not passed, the previous default value (if any) will be used.
232+
# Otherwise, the default will be +nil+. A proc can also be passed, and
233+
# will be called once each time a new value is needed.
229234
#
230-
# +user_provided_default+ Whether the default value should be cast using
231-
# +cast+ or +deserialize+.
235+
# [+user_provided_default+]
236+
# Whether the default value should be cast using +cast+ or +deserialize+.
232237
def define_attribute(
233238
name,
234239
cast_type,

0 commit comments

Comments
 (0)