Adds an entry inside moderation section that allows moderators to check
pending tasks and mark them as solved.
This commit is contained in:
Juan Salvador Pérez García
2018-06-18 11:39:04 +02:00
parent 83f78b1940
commit 33b3431c70
27 changed files with 384 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
# frozen_string_literal: true
class AdministratorTask < ActiveRecord::Base
belongs_to :source, polymorphic: true
belongs_to :user
validates :source, presence: true
default_scope { order(created_at: :asc) }
scope :pending, -> { where(executed_at: nil) }
scope :done, -> { where.not(executed_at: nil) }
end