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 ```