Why hello there! Tim here bringing you all the latest and greatest from This Week In Rails.
Some sugar around enum values allows you to make negative scopes such as
Post.not_drafted # => where.not(status: :drafted)
Allows you to change a previously set select statement in the same manner to rewhere and reorder, e.g.
#size_ would ignore the DISTINCT in the select, giving a different result to
#count. This is now fixed!
If you attached a
has_one_attachment attachment, you may have found that the attachment’s
_blob method would have returned
nil. This was fixed by assigning the blob when the attachment is assigned.
Until next week!