aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2007-12-05 14:47:44 +0000
committerMarcel Molina <marcel@vernix.org>2007-12-05 14:47:44 +0000
commit4570cf66cea1ab8b0486ad42823fe04182a5b5d2 (patch)
tree2afeee33b542c88523cfcf782eb657865d96b4ee
parent096f3f64680c9f19c78999a6b2ffdaca9606403c (diff)
downloadrails-4570cf66cea1ab8b0486ad42823fe04182a5b5d2.tar.gz
rails-4570cf66cea1ab8b0486ad42823fe04182a5b5d2.tar.bz2
rails-4570cf66cea1ab8b0486ad42823fe04182a5b5d2.zip
Document the timestamps schema definition method. Closes #9000 [mikong]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 8fa58b96cc..5cf45fcf51 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Document the timestamps schema definition method. Closes #9000 [mikong]
+
* Give examples for what tables should be called for models inside a module namespace. Closes #10288 [scott_willson]
* Document the :message option for validates_associated. Closes #10357 [dylans]
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index 39064d4d13..86ff16531f 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -432,6 +432,8 @@ module ActiveRecord
EOV
end
+ # Appends <tt>:datetime</tt> columns <tt>:created_at</tt> and
+ # <tt>:updated_at</tt> to the table.
def timestamps
column(:created_at, :datetime)
column(:updated_at, :datetime)