Advisory locking with ActiveRecord
Not too long ago we had a problem with doing (almost) guaranteed inserts for columns with unique constraints on them (see this post). Today I was facing a…
Not too long ago we had a problem with doing (almost) guaranteed inserts for columns with unique constraints on them (see this post). Today I was facing a…
Generally, when someone wants to ensure that a models field is unique, they use a database unique index in conjunction with validates_uniqueness_of :field. The problem with this approach…
Recently I ran into a case where I had two separate “acts_as” style ActiveRecord model extensions which both abused respond_to? and method_missing to dynamically provide virtual attribute support.…