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.
Looking for help keeping your python code quality under control? Check out my
new product: Code DB
Hi, my name is Martin Vielsmaier. I work as an independent software developer.
Code is available on github.
I seldomly tweet at @moserei, you can connect with me on