AutoCommit Mit Jul 15 12:03:05 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-15 12:03:05 +02:00
parent 1d4bc2baab
commit 5b70b67bfe
3 changed files with 7 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ class Thema < ActiveRecord::Base
validates :title, :presence => true
validates :text, :presence => true
scope :outdated, -> {includes(:translations).where("thema_translations.updated_at<?",7.month.ago).where("thema_translations.locale"=>I18n.t.locale)}
scope :outdated, -> {includes(:translations).where("thema_translations.updated_at<?",7.month.ago).where("thema_translations.locale"=>I18n.locale)}
scope :public, where(:isdraft=>false).includes(:themengruppe).where("themengruppen.public"=>true)
default_scope includes(:translations).order("themen.priority").reverse_order