mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 18:56:06 -04:00
15 lines
249 B
Ruby
15 lines
249 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Finishable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
scope :finished, -> { where(finished: true) }
|
|
scope :current, -> { where.not(finished: true) }
|
|
|
|
def active
|
|
!finished
|
|
end
|
|
end
|
|
end
|