fix neuigkeiten
This commit is contained in:
@@ -28,7 +28,8 @@ class Neuigkeit < ActiveRecord::Base
|
||||
|
||||
default_scope order(:datum).reverse_order
|
||||
scope :recent, -> { published.limit(10)}
|
||||
scope :unpublished, -> {where("datum >= ? OR datum IS NULL", Date.today)}
|
||||
scope :unpublished, -> {where("datum > ? OR datum IS NULL", Date.today)}
|
||||
scope :published_scope, ->{where("datum <= ? OR datum IS NULL", Date.today)}
|
||||
scope :public, ->{includes(:rubrik).where("rubriken.public"=>true)}
|
||||
scope :intern, ->{includes(:rubrik).where("rubriken.public"=>false)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user