rails/rails — pull request #14947 by jcoleman (2014-05-02 16:44:33+00:00)
Title: Fix exception when logging SQL w/ nil binary value. (4-1-stable backport)

When an object with a binary column is updated with a nil value in that column, the SQL logger would throw an exception when trying to log that nil value. This only occurs when updating a record that already has a non-nil value in that column since an initial nil value isn't included in the SQL anyway (at least, when dirty checking is enabled.) The column's new value will now be logged as to parallel the existing for non-nil values.