Fix Rails 4.2 breakage re attribute type coercion