From f9103e1fe20e66315f4ea73e14df8850eec2f8e3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 19 May 2005 17:36:25 +0000 Subject: Fixed Time#last_year to go back in time, not forward #1278 [fabien@odilat.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/time/calculations.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/time') diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index f238ca168a..1c9a3523a9 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -64,12 +64,12 @@ module ActiveSupport #:nodoc: change(:year => self.year + years) end - # Short-hand for months_ago(1) + # Short-hand for years_ago(1) def last_year - years_since(1) + years_ago(1) end - # Short-hand for months_since(1) + # Short-hand for years_since(1) def next_year years_since(1) end -- cgit v1.2.3