From 819e07338b15f6afe3ea9538640120be071acb41 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 20 Apr 2015 18:37:14 +0300 Subject: [PATCH] Introduce a confirmed scope for Event --- app/models/event.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/event.rb b/app/models/event.rb index ddadd77..2db7f8a 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -6,4 +6,6 @@ class Event < ActiveRecord::Base validates :abstract, presence: true validates :description, presence: true validates :agreement, acceptance: true + + scope :confirmed, -> { where.not confirmed_at: nil } end