From b0abb75d6b9a72857e6ea2bb580a58314828a9c5 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 29 Oct 2014 13:27:34 +0100 Subject: [PATCH] thma fix --- app/models/thema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/thema.rb b/app/models/thema.rb index 9a426d1..d880e94 100644 --- a/app/models/thema.rb +++ b/app/models/thema.rb @@ -21,7 +21,7 @@ include Rails.application.routes.url_helpers validates :themengruppe, :presence => true validates :title, :presence => true validates :text, :presence => true - scope :public, where(:isdraft=>false).inlcudes(:themengruppe).where("themengruppen.public") + scope :public, where(:isdraft=>false).includes(:themengruppe).where("themengruppen.public") default_scope order(:priority).reverse_order scope :search, ->(query) {where("text like ? or title like ?", "%#{query}%", "%#{query}%")} scope :outdated, -> {includes(:translations).where("thema_translations.updated_atI18n.t.locale)