Active Record validation:

new_record?()//用于验证刚新建,但没存入database中的数据 ,返回true或false

persisted?() //和new_record/()正相反,从英文意看出,Returns true if the record is persisted.it's not a new record and it was not destroyed.