# Created modified fields

**URL:** <https://www.ruby-forum.com/t/created-modified-fields/128822>\
**Category:** Rails\
**Created:** [February 11, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/created-modified-fields/128822 "2008-02-11T23:12:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 11, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/created-modified-fields/128822/1 "2008-02-11T23:12:04Z")

</div>

If this has been discussed before, pardon me. My search skills might  
not be up to the task of finding it. Does Rails have automagic support  
for created/modified columns like cakePHP does?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 11, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/created-modified-fields/128822/2 "2008-02-11T23:59:43Z")

</div>

On 2/11/08, rogwei [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> If this has been discussed before, pardon me. My search skills might  
> not be up to the task of finding it. Does Rails have automagic support  
> for created/modified columns like cakePHP does?

Guessing a bit about cakePHP, I’d say yes.

If you create a datetime called created\_at, or created\_on it will be  
automatically initialized when each record is first saved. a field  
named either updated\_at, or updated\_on will set each time the record  
is saved.

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)
