aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)