注意 save 也能夠略過驗證,傳入 validate: false 作為參數即可。這個技巧要小心使用。 ... ActiveRecord::RecordInvalid: Validation failed: Name can't be blank.
確定! 回上一頁