From 696ed4ebdd64d996547c7a415c609b9229fd6521 Mon Sep 17 00:00:00 2001 From: Collin Jilbert Date: Mon, 12 Dec 2022 21:11:08 -0600 Subject: [PATCH] update return values to reflect the proper object class --- guides/source/association_basics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md index 2b8b56e7611ee..12ac7657149fb 100644 --- a/guides/source/association_basics.md +++ b/guides/source/association_basics.md @@ -1006,10 +1006,10 @@ Does the same as `create_association` above, but raises `ActiveRecord::RecordInv The `association_changed?` method returns true if a new associated object has been assigned and the foreign key will be updated in the next save. ```ruby -@book.author # => # +@book.author # => # @book.author_changed? # => false -@book.author = Author.second # => # +@book.author = Author.second # => # @book.author_changed? # => true @book.save! @@ -1021,10 +1021,10 @@ The `association_changed?` method returns true if a new associated object has be The `association_previously_changed?` method returns true if the previous save updated the association to reference a new associate object. ```ruby -@book.author # => # +@book.author # => # @book.author_previously_changed? # => false -@book.author = Author.second # => # +@book.author = Author.second # => # @book.save! @book.author_previously_changed? # => true ```