Skip to content

Comment on Hexatetrahedral Rails

Comments

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).
julikOP

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.