How to automate timestamps in ActiveRecord models

Comparing #3 with #4

Revision #4 was created by jonah jonah on Feb 16, 2009, 6:48:20 AM.

making sure this site is XSS free

Content

<script type="text/javascript">
 
/*<![CDATA[*/
 
jQuery(document).ready(function() {
 
 
 
$('p').hide();
 
 
});
 
/*]]>*/
 
</script>
 
 
There are dozens of ways to automate the setting of timestamps in yii ActiveRecord models. Two ways you can do this are

1. Via rules()
2. Via beforeSave()

To start off we need a database table.
[...]