Make update_attributes behaviour compatible with Rails