Difference between #11 and #12 of
"safe" and "unsafe" Model validators (massive assignments)

Revision #12 has been created by brianvu on Sep 17, 2016, 3:19:35 PM with the memo:

Update Yii version for tutorial
« previous (#11)

Changes

Title unchanged

"safe" and "unsafe" Model validators (massive assignments)

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

safe, unsafe, validators, scenarios, model

Content unchanged

[...]
$this->render('create',array('model'=>$model));
}
```

note: the first rule matches and save the attribute (for all cases even for blacklistuser scenario) but the second one overrides the first and assigns as unsaved this attribute. also κeep in mind the order of the rules is irrelevant.
2 2
7 followers
Viewed: 37 052 times
Version: 1.1
Category: How-tos
Last updated by: brianvu
Created on: Jul 13, 2013
Last updated: 8 years ago
Update Article

Revisions

View all history