aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-30 13:06:19 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-30 13:06:19 +0000
commitea3016f5d93706a497fb5887e72e7c9ac5d8e9d9 (patch)
treecaec76070fd89a0ecbcc8616e4b7e4a13e212e8b
parentb94bd32f3116b469b48400382dbc964bf17994d1 (diff)
downloadrails-ea3016f5d93706a497fb5887e72e7c9ac5d8e9d9.tar.gz
rails-ea3016f5d93706a497fb5887e72e7c9ac5d8e9d9.tar.bz2
rails-ea3016f5d93706a497fb5887e72e7c9ac5d8e9d9.zip
Renamed DateHelper#distance_of_time_in_words_to_now to DateHelper#time_ago_in_words (old method name is still available as a deprecated alias)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb4
-rw-r--r--activerecord/CHANGELOG5
2 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index adb41330e5..b774b67315 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -41,9 +41,11 @@ module ActionView
end
# Like distance_of_time_in_words, but where <tt>to_time</tt> is fixed to <tt>Time.now</tt>.
- def distance_of_time_in_words_to_now(from_time, include_seconds = false)
+ def time_ago_in_words(from_time, include_seconds = false)
distance_of_time_in_words(from_time, Time.now, include_seconds)
end
+
+ alias_method :distance_of_time_in_words_to_now, :time_ago_in_words
# Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based attribute (identified by
# +method+) on an object assigned to the template (identified by +object+). It's possible to tailor the selects through the +options+ hash,
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index ffd99de945..4c0c11e4a9 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Renamed DateHelper#distance_of_time_in_words_to_now to DateHelper#time_ago_in_words (old method name is still available as a deprecated alias)
+
+
*1.9.1* (27th March, 2005)
* Fixed that Active Record objects with float attribute could not be cloned #808