diff options
author | Patrick Reagan <patrick.reagan@viget.com> | 2008-08-22 12:48:00 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-22 12:48:00 +0100 |
commit | 683ff235e6b81d28962f5a71ff53730a1c118fc8 (patch) | |
tree | 6fbd872794f15d60bb89ed5eecdcf3c8ef3683b2 /activerecord/lib/active_record | |
parent | 52ac9d04442296abe7f05fc4701e1be7a0eed1f8 (diff) | |
download | rails-683ff235e6b81d28962f5a71ff53730a1c118fc8.tar.gz rails-683ff235e6b81d28962f5a71ff53730a1c118fc8.tar.bz2 rails-683ff235e6b81d28962f5a71ff53730a1c118fc8.zip |
Ensure t.timestamps respects options. [#828 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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 31d6c7942c..98016ddab5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -443,9 +443,10 @@ module ActiveRecord # 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) + def timestamps(*args) + options = args.extract_options! + column(:created_at, :datetime, options) + column(:updated_at, :datetime, options) end def references(*args) |