Files
growstuff/app/models/concerns/finishable.rb
2019-12-26 23:15:38 +13:00

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