hotsh/rstat.us — comment on commit 0486e6c5a42bf63304473f4749a57746fcbb0ccb
File: app/models/update.rb line 270
By wilkie:

Probably don't need to check the id. The function is to ensure that somebody does not post the same status twice, which people ended up doing at some point.

Since the already_posted? function ONLY checks against the last post, it doesn't actually do what it implies. You'd have to have a name like matches_last_post? or something instead. I'm not sure this refactor is all that important. If that line is too long, just put the if before the errors.add and indent.

> Yeah, in ruby, !! is almost always an anti-pattern.

So is a tri-bool. :)