Fix bug: ActiveRecord RecordInvalid raised