fix undefined method `[]=' for #<ActiveRecord: