ActiveRecord

A workaround for ActiveRecord's partial updates not working properly with serialised columns (bug?)

Filed under: Ruby & Rails
bug-activerecord-partial-updates-serialised-columns.png

ActiveRecord supports a feature called "partial updates" that helps reduce network traffic towards the database, improving performance in some cases, for example with models having large text or blob columns. However, it does not play well with serialised columns. Here's why, and a working fix.

Read more »

A serialisable and validatable tableless model to get rid of a few tables and speed things up

Filed under: Ruby & Rails
tableless-model.jpg

I have just published a tiny gem, called tableless_model. It includes some functionality I have used quite often in my recent projects, which can help reduce database complexity, and improve performance, by replacing tables and associations with fewer tables storing serialised data instead.

Read more »