Skip to content

Commit 5f9cf4c

Browse files
Format options doc as a description list [ci-skip]
1 parent 3c38fe5 commit 5f9cf4c

File tree

1 file changed

+12
-8
lines changed
  • activerecord/lib/active_record/attribute_methods

1 file changed

+12
-8
lines changed

activerecord/lib/active_record/attribute_methods/dirty.rb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@ def reload(*)
7676
#
7777
# ==== Options
7878
#
79-
# +from+ When passed, this method will return false unless the original
80-
# value is equal to the given option
79+
# [+from+]
80+
# When specified, this method will return false unless the original
81+
# value is equal to the given value.
8182
#
82-
# +to+ When passed, this method will return false unless the value was
83-
# changed to the given value
83+
# [+to+]
84+
# When specified, this method will return false unless the value will be
85+
# changed to the given value.
8486
def saved_change_to_attribute?(attr_name, **options)
8587
mutations_before_last_save.changed?(attr_name.to_s, **options)
8688
end
@@ -126,11 +128,13 @@ def saved_changes
126128
#
127129
# ==== Options
128130
#
129-
# +from+ When passed, this method will return false unless the original
130-
# value is equal to the given option
131+
# [+from+]
132+
# When specified, this method will return false unless the original
133+
# value is equal to the given value.
131134
#
132-
# +to+ When passed, this method will return false unless the value will be
133-
# changed to the given value
135+
# [+to+]
136+
# When specified, this method will return false unless the value will be
137+
# changed to the given value.
134138
def will_save_change_to_attribute?(attr_name, **options)
135139
mutations_from_database.changed?(attr_name.to_s, **options)
136140
end

0 commit comments

Comments
 (0)