Comparing
#5 with
#6
Revision #6 was created by
softark on Apr 16, 2012, 6:54:03 AM.
Rules for foreign keys
Content
[...]
In the model rules() method put:
```php
array('format', 'range', 'in' => array('html', 'rss2', 'atom', 'json', 'xml')),
```
then later remind yourself that Yii is not SQL.
Rules for foreign keys
----------------------
In the model rules() method put:
```php
array('foreingKey', 'exists', 'className' => 'SomeModel', 'attributeName' => 'id'),
```
Sure we have 'exists' method for CActiveRecord model, but ...