@@ -76,11 +76,13 @@ def reload(*)
76
76
#
77
77
# ==== Options
78
78
#
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.
81
82
#
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.
84
86
def saved_change_to_attribute? ( attr_name , **options )
85
87
mutations_before_last_save . changed? ( attr_name . to_s , **options )
86
88
end
@@ -126,11 +128,13 @@ def saved_changes
126
128
#
127
129
# ==== Options
128
130
#
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.
131
134
#
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.
134
138
def will_save_change_to_attribute? ( attr_name , **options )
135
139
mutations_from_database . changed? ( attr_name . to_s , **options )
136
140
end
0 commit comments