Remix.run Logo
pqdbr 3 days ago

The article has this gist:

  user.log_entries.delete_all
  user.log_entries.create!(message: "User account reset")
  user.log_entries #=> [], will be empty until reloaded
This is false. At least not in Rails 7+ (haven't tested earlier), user.log_entries will return exactly what you'd expect (one instance of LogEntry).
3 days ago | parent | next [-]
[deleted]
julik 2 days ago | parent | prev [-]

OP here - for what it's worth, this was the case on our application which was Rails 8. Some other gem or workflow may have been involved, but is highly unlikely.