|
during insert |
|
|
|
in before_save |
|
`attribute_change(:title)` output |
|
5.1.6.1: [nil, "initial"] |
|
5.2.2: [nil, "initial"] |
|
`changed` output |
|
5.1.6.1: ["title"] |
|
5.2.2: ["title"] |
|
`changed_attributes` output |
|
5.1.6.1: {"title"=>nil} |
|
5.2.2: {"title"=>nil} |
|
`changes` output |
|
5.1.6.1: {"title"=>[nil, "initial"]} |
|
5.2.2: {"title"=>[nil, "initial"]} |
|
`changes.keys` output |
|
5.1.6.1: ["title"] |
|
5.2.2: ["title"] |
|
`previous_changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`saved_change_to_title?` output |
|
5.1.6.1: false |
|
5.2.2: false |
|
`saved_changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`title_before_last_save` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`title_changed?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
|
|
in after_save |
|
|
|
`attribute_change(:title)` output *** CHANGED*** |
|
5.1.6.1: [nil, "initial"] |
|
5.2.2: nil |
|
|
|
`changed` output *** CHANGED*** |
|
5.1.6.1: ["id", "title"] |
|
5.2.2: [] |
|
|
|
`changed_attributes` output *** CHANGED*** |
|
5.1.6.1: {"id"=>nil, "title"=>nil} |
|
5.2.2: {} |
|
|
|
`changes` output *** CHANGED*** |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {} |
|
|
|
`changes.keys` output *** CHANGED*** |
|
5.1.6.1: ["id", "title"] |
|
5.2.2: [] |
|
|
|
`previous_changes` output *** CHANGED*** |
|
5.1.6.1: {} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`title_before_last_save` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
|
|
`title_changed?` output *** CHANGED*** |
|
5.1.6.1: true |
|
5.2.2: false |
|
|
|
in after_commit |
|
`attribute_change(:title)` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`changed` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`changed_attributes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes.keys` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`previous_changes` output |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`title_before_last_save` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`title_changed?` output |
|
5.1.6.1: false |
|
5.2.2: false |
|
|
|
|
|
during update |
|
|
|
in before_save |
|
`attribute_change(:title)` output |
|
5.1.6.1: ["initial", "updated"] |
|
5.2.2: ["initial", "updated"] |
|
`changed` output |
|
5.1.6.1: ["title"] |
|
5.2.2: ["title"] |
|
`changed_attributes` output |
|
5.1.6.1: {"title"=>"initial"} |
|
5.2.2: {"title"=>"initial"} |
|
`changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`changes.keys` output |
|
5.1.6.1: ["title"] |
|
5.2.2: ["title"] |
|
`previous_changes` output |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
`title_before_last_save` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`title_changed?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
|
|
in after_save |
|
|
|
`attribute_change(:title)` output *** CHANGED*** |
|
5.1.6.1: ["initial", "updated"] |
|
5.2.2: nil |
|
|
|
`changed` output *** CHANGED*** |
|
5.1.6.1: ["title"] |
|
5.2.2: [] |
|
|
|
`changed_attributes` output *** CHANGED*** |
|
5.1.6.1: {"title"=>"initial"} |
|
5.2.2: {} |
|
|
|
`changes` output *** CHANGED*** |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {} |
|
|
|
`changes.keys` output *** CHANGED*** |
|
5.1.6.1: ["title"] |
|
5.2.2: [] |
|
|
|
`previous_changes` output *** CHANGED*** |
|
5.1.6.1: {"id"=>[nil, 1], "title"=>[nil, "initial"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`title_before_last_save` output |
|
5.1.6.1: "initial" |
|
5.2.2: "initial" |
|
|
|
`title_changed?` output *** CHANGED*** |
|
5.1.6.1: true |
|
5.2.2: false |
|
|
|
in after_commit |
|
`attribute_change(:title)` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`changed` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`changed_attributes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes.keys` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`previous_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`title_before_last_save` output |
|
5.1.6.1: "initial" |
|
5.2.2: "initial" |
|
`title_changed?` output |
|
5.1.6.1: false |
|
5.2.2: false |
|
|
|
|
|
during destroy |
|
|
|
in before_destroy |
|
`attribute_change(:title)` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`changed` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`changed_attributes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes.keys` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`previous_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`title_before_last_save` output |
|
5.1.6.1: "initial" |
|
5.2.2: "initial" |
|
`title_changed?` output |
|
5.1.6.1: false |
|
5.2.2: false |
|
|
|
in after_destroy |
|
`attribute_change(:title)` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`changed` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`changed_attributes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes.keys` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`previous_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`title_before_last_save` output |
|
5.1.6.1: "initial" |
|
5.2.2: "initial" |
|
`title_changed?` output |
|
5.1.6.1: false |
|
5.2.2: false |
|
|
|
in after_commit |
|
`attribute_change(:title)` output |
|
5.1.6.1: nil |
|
5.2.2: nil |
|
`changed` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`changed_attributes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes` output |
|
5.1.6.1: {} |
|
5.2.2: {} |
|
`changes.keys` output |
|
5.1.6.1: [] |
|
5.2.2: [] |
|
`previous_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`saved_change_to_title?` output |
|
5.1.6.1: true |
|
5.2.2: true |
|
`saved_changes` output |
|
5.1.6.1: {"title"=>["initial", "updated"]} |
|
5.2.2: {"title"=>["initial", "updated"]} |
|
`title_before_last_save` output |
|
5.1.6.1: "initial" |
|
5.2.2: "initial" |
|
`title_changed?` output |
|
5.1.6.1: false |
|
5.2.2: false |