From ebf486b347e78a756fdce672e1889e88f87030eb Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 9 Feb 2015 15:38:38 +0100 Subject: [PATCH] outdate topics after 7 months --- app/models/thema.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/thema.rb b/app/models/thema.rb index 11e97aa..bbfcb2a 100644 --- a/app/models/thema.rb +++ b/app/models/thema.rb @@ -31,12 +31,12 @@ include Rails.application.routes.url_helpers text :text text :title, :boost=>4.0 end - scope :outdated, -> {includes(:translations).where("thema_translations.updated_atI18n.t.locale) + scope :outdated, -> {includes(:translations).where("thema_translations.updated_atI18n.t.locale) } translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true def is_outdated? unless translation.try(:updated_at).nil? - translation.updated_at < 2.month.ago + translation.updated_at < 7.month.ago else false end