mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make changes_applied public again
This was (accidentally?) made private, whereas previously it was public.
This commit is contained in:
parent
ac3910791d
commit
883292fdca
1 changed files with 5 additions and 5 deletions
|
@ -282,6 +282,11 @@ module ActiveRecord
|
||||||
new_record? || has_changes_to_save? || marked_for_destruction? || nested_records_changed_for_autosave?
|
new_record? || has_changes_to_save? || marked_for_destruction? || nested_records_changed_for_autosave?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def changes_applied # :nodoc:
|
||||||
|
@_already_called[:changes_applied] = true
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
# Track if this record is currently being saved.
|
# Track if this record is currently being saved.
|
||||||
# Autosave can call save multiple times on the same record. Some methods
|
# Autosave can call save multiple times on the same record. Some methods
|
||||||
|
@ -530,11 +535,6 @@ module ActiveRecord
|
||||||
errors.uniq!
|
errors.uniq!
|
||||||
end
|
end
|
||||||
|
|
||||||
def changes_applied
|
|
||||||
@_already_called[:changes_applied] = true
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
# Call +changes_applied+ at least once or if attributes changed
|
# Call +changes_applied+ at least once or if attributes changed
|
||||||
def _apply_changes?(attribute_names)
|
def _apply_changes?(attribute_names)
|
||||||
!@_already_called[:changes_applied] || attribute_names.present?
|
!@_already_called[:changes_applied] || attribute_names.present?
|
||||||
|
|
Loading…
Reference in a new issue