summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/page.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/page.rb b/app/models/page.rb
index ee1e70a..b11b43c 100644
--- a/app/models/page.rb
+++ b/app/models/page.rb
@@ -134,7 +134,7 @@ class Page < ActiveRecord::Base
134 end 134 end
135 135
136 # Returns true if a page has translations where one of them is significantly 136 # Returns true if a page has translations where one of them is significantly
137 # older than the other 137 # older than the other.
138 # Takes the I18n.default locale and a second :locale to test if the 138 # Takes the I18n.default locale and a second :locale to test if the
139 # translations for the given locales exist and if their updated_at attributes 139 # translations for the given locales exist and if their updated_at attributes
140 # have a delta time that is greater than the specified :delta_time 140 # have a delta time that is greater than the specified :delta_time
@@ -156,8 +156,7 @@ class Page < ActiveRecord::Base
156 if translations.size > 1 && default && custom 156 if translations.size > 1 && default && custom
157 time = default.updated_at - custom.updated_at 157 time = default.updated_at - custom.updated_at
158 difference = time.to_i.abs 158 difference = time.to_i.abs
159 159 return (options[:delta_time].to_i.abs < difference)
160 return (options[:delta_time].abs < difference)
161 else 160 else
162 return false 161 return false
163 end 162 end