mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-30 20:20:59 -05: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
|