Sha256: c35b4f9e110a8315dd91cda865d9540492494c360818fa4ceadf590b2be42a14
Contents?: true
Size: 701 Bytes
Versions: 12
Compression:
Stored size: 701 Bytes
Contents
# frozen_string_literal: true module Decidim class ReminderRecord < ApplicationRecord belongs_to :reminder, foreign_key: "decidim_reminder_id", class_name: "Decidim::Reminder" belongs_to :remindable, foreign_type: "remindable_type", polymorphic: true, optional: true scope :active, -> { where(state: "active") } scope :pending, -> { where(state: "pending") } scope :completed, -> { where(state: "completed") } scope :deleted, -> { where(state: "deleted") } def active? state == "active" end def pending? state == "pending" end def completed? state == "completed" end def deleted? state == "deleted" end end end
Version data entries
12 entries across 12 versions & 1 rubygems