diff options
author | heavysixer <heavysixer@gmail.com> | 2008-10-23 13:57:35 -0500 |
---|---|---|
committer | heavysixer <heavysixer@gmail.com> | 2008-10-23 13:57:35 -0500 |
commit | 92937fbf9b56d2f069f0fdfa7a2c5b19c89dc75f (patch) | |
tree | 64a1686069ea4855cb155abede0d3354f88171b2 /railties/doc/guides | |
parent | 67ed370d8e69133bc48abd8185d002f60226990e (diff) | |
download | rails-92937fbf9b56d2f069f0fdfa7a2c5b19c89dc75f.tar.gz rails-92937fbf9b56d2f069f0fdfa7a2c5b19c89dc75f.tar.bz2 rails-92937fbf9b56d2f069f0fdfa7a2c5b19c89dc75f.zip |
The _at / _on timestamp methods do the same things, I seemed to remember a distinction at some point but I guess that's changed.
Diffstat (limited to 'railties/doc/guides')
-rw-r--r-- | railties/doc/guides/source/active_record_basics.txt | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/railties/doc/guides/source/active_record_basics.txt b/railties/doc/guides/source/active_record_basics.txt index 9bd3cee324..213411ffb7 100644 --- a/railties/doc/guides/source/active_record_basics.txt +++ b/railties/doc/guides/source/active_record_basics.txt @@ -58,15 +58,13 @@ used to designate a table using Single Table Inheritance. If you are not using S keyword like "context", that may still accurately describe the data you are modeling. [grid=all] -`-------------------`--------------------------------------------------------------------------------- -created_at Rails stores the current date to this field when creating the record. -created_on Rails stores the current date & time to this field when creating the record. -updated_at Rails stores the current date to this field when updating the record. -updated_on Rails stores the current date & time to this field when updating the record. -lock_version Adds optimistic locking to a model link:http://api.rubyonrails.com/classes/ActiveRecord/Locking.html[more about optimistic locking]. -type Specifies that the model uses Single Table Inheritance link:http://api.rubyonrails.com/classes/ActiveRecord/Base.html[more about STI]. -id All models require an id. the default is name is "id" but can be changed using the "set_primary_key" or "primary_key" methods. -#{table_name}_count Can be used to caches the number of belonging objects on the associated class. +`------------------------`--------------------------------------------------------------------------------- +created_at / created_on Rails stores the current date & time to this field when creating the record. +updated_at / updated_on Rails stores the current date & time to this field when updating the record. +lock_version Adds optimistic locking to a model link:http://api.rubyonrails.com/classes/ActiveRecord/Locking.html[more about optimistic locking]. +type Specifies that the model uses Single Table Inheritance link:http://api.rubyonrails.com/classes/ActiveRecord/Base.html[more about STI]. +id All models require an id. the default is name is "id" but can be changed using the "set_primary_key" or "primary_key" methods. +#{table_name}_count Can be used to caches the number of belonging objects on the associated class. ------------------------------------------------------------------------------------------------------ By default rails assumes all tables will use “id” as their primary key to identify each record. Though fortunately you won’t have explicitly declare this, Rails will automatically create that field unless you tell it not to. |