From fb25bab7dd0ac761702d23ff60decbca9d03dd56 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 29 Mar 2009 00:00:47 +0100 Subject: Added unit test to verify the basic functionality of the find_with_outdated_translations method. Found and fixed some issued on the way. [ x ] Testing rocks --- app/models/page.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/models/page.rb b/app/models/page.rb index 107ceb9..5f0d389 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -72,7 +72,7 @@ class Page < ActiveRecord::Base end end - def self.find_outdated_translations options = {} + def self.find_with_outdated_translations options = {} defaults_options = { :include => :globalize_translations } @@ -145,8 +145,8 @@ class Page < ActiveRecord::Base if translations.size > 1 && default && custom time = default.updated_at - custom.updated_at - difference = (time/24/3600).to_i.abs - if 1 < difference + difference = (time/3600).to_i.abs + if 23 < difference return true else return false -- cgit v1.3