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. create //验证失败仅仅不会执行代码,返回false. create! //带…
1.新建Controller public ActionResult Index() { return View(); } public ActionResult Person(int? id) { //could add code here to get model based on id.... return PartialView("_Person"); //calling partial with existing model.... //return PartialView(…