# Dealing with created\_on and updated\_on?

**URL:** <https://www.ruby-forum.com/t/dealing-with-created-on-and-updated-on/86976>\
**Category:** Rails\
**Created:** [February 27, 2007, 8:57am UTC](https://www.ruby-forum.com/t/dealing-with-created-on-and-updated-on/86976 "2007-02-27T08:57:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [February 27, 2007, 8:57am UTC](https://www.ruby-forum.com/t/dealing-with-created-on-and-updated-on/86976/1 "2007-02-27T08:57:08Z")

</div>

Hi everyone,

I’m working through some of the books and all going fairly well…

But I’m just wondering why when you create a scaffold for a table why  
it includes created\_on/at and updated\_on/at fields for the create and  
edit modes ?

As these are internally updated fields they should not be exposed to  
user access…

So how do I now take them out of the forms & let them create/update  
themselves ?

TIA - Dave P.

---

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [February 27, 2007, 9:20am UTC](https://www.ruby-forum.com/t/dealing-with-created-on-and-updated-on/86976/2 "2007-02-27T09:20:13Z")

</div>

Hi Dave, how did you create these model(s)? Did you mean the create  
and edit actions for the controller? In any case, you simply remove  
this information from the view in question.

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![Davo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@Davo](https://www.ruby-forum.com/u/Davo)\
**Post date:** [February 27, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/dealing-with-created-on-and-updated-on/86976/3 "2007-02-27T14:20:50Z")

</div>

created\_on/at updated\_on/at are magic column names used by  
ActiveRecord. They store the date/date+time when the table for the  
corresponding object is created/updated.

You sholdn’t need them in the form at all. Those fields will be  
updated automatically when you create, save, etc. on the model  
object.

Scott

Have a look at the migration for the table. Yo
