@@ -22,28 +22,34 @@ module ClassMethods
22
22
# your domain objects across much of Active Record, without having to
23
23
# rely on implementation details or monkey patching.
24
24
#
25
- # +name+ The name of the methods to define attribute methods for, and the
26
- # column which this will persist to.
25
+ # ==== Parameters
27
26
#
28
- # +cast_type+ A symbol such as +:string+ or +:integer+, or a type object
29
- # to be used for this attribute. If this parameter is not passed, the previously
30
- # defined type (if any) will be used.
31
- # Otherwise, the type will be ActiveModel::Type::Value.
32
- # See the examples below for more information about providing custom type objects.
27
+ # [+name+]
28
+ # The name of the methods to define attribute methods for, and the
29
+ # column which this will persist to.
33
30
#
34
- # ==== Options
31
+ # [+cast_type+]
32
+ # A symbol such as +:string+ or +:integer+, or a type object to be used
33
+ # for this attribute. If this parameter is not passed, the previously
34
+ # defined type (if any) will be used. Otherwise, the type will be
35
+ # ActiveModel::Type::Value. See the examples below for more information
36
+ # about providing custom type objects.
35
37
#
36
- # The following options are accepted:
38
+ # ==== Options
37
39
#
38
- # +default+ The default value to use when no value is provided. If this option
39
- # is not passed, the previously defined default value (if any) on the superclass or in the schema will be used.
40
- # Otherwise, the default will be +nil+.
40
+ # [+:default+]
41
+ # The default value to use when no value is provided. If this option is
42
+ # not passed, the previously defined default value (if any) on the
43
+ # superclass or in the schema will be used. Otherwise, the default will
44
+ # be +nil+.
41
45
#
42
- # +array+ (PostgreSQL only) specifies that the type should be an array (see the
43
- # examples below).
46
+ # [+:array+]
47
+ # (PostgreSQL only) Specifies that the type should be an array. See the
48
+ # examples below.
44
49
#
45
- # +range+ (PostgreSQL only) specifies that the type should be a range (see the
46
- # examples below).
50
+ # [+:range+]
51
+ # (PostgreSQL only) Specifies that the type should be a range. See the
52
+ # examples below.
47
53
#
48
54
# When using a symbol for +cast_type+, extra options are forwarded to the
49
55
# constructor of the type object.
0 commit comments