Using proper ActiveRecord method (update_attribute instead of update_attributes). Included tests.