It’s somehow trivial, but I found out about ‘write_attribute’
only just: (another case of rtfm)
class Thing < ActiveRecord::Base
str.upcase! unless str.nil?
Be careful if you use this with Datetime attributes.
Hi, my name is Martin Vielsmaier. I work as a software developer & consultant.
Code is available on github.
I seldomly tweet at @moserei, you can connect with me on