diff options
author | Tony Schneider <tonywok@gmail.com> | 2012-06-21 17:40:54 -0400 |
---|---|---|
committer | Tony Schneider <tonywok@gmail.com> | 2012-06-22 14:18:44 -0400 |
commit | 6657ec9a0a05c1b3ddcb7aa679ebfdb7e0bc4959 (patch) | |
tree | aa7b6b7dd270bddacc17e495a0e999b66ef47059 /activerecord/CHANGELOG.md | |
parent | a232831f2dc0dd2ccec0ab152a87614b1fc95fb0 (diff) | |
download | rails-6657ec9a0a05c1b3ddcb7aa679ebfdb7e0bc4959.tar.gz rails-6657ec9a0a05c1b3ddcb7aa679ebfdb7e0bc4959.tar.bz2 rails-6657ec9a0a05c1b3ddcb7aa679ebfdb7e0bc4959.zip |
Allow precision option for postgresql datetimes
This patch addresses the difficulty of retrieving datetime fields. By default, the database holds a higher precision than the time as a String.
This issue is discussed at length at the following links:
- [#3519](https://github.com/rails/rails/issues/3519)
- [#3520](https://github.com/rails/rails/issues/3520)
Also, kudos to @mattscilipoti
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index ed5f29cfe4..00f290d964 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,17 @@ ## Rails 4.0.0 (unreleased) ## +* Added support for specifying the precision of a timestamp in the postgresql + adapter. So, instead of having to incorrectly specify the precision using the + `:limit` option, you may use `:precision`, as intended. For example, in a migration: + + def change + create_table :foobars do |t| + t.timestamps :precision => 0 + end + end + + *Tony Schneider* + * Allow ActiveRecord::Relation#pluck to accept multiple columns. Returns an array of arrays containing the typecasted values: |