Verified Commit 2f7b0cdb authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

add validation for active false on terminated group offer

parent 7754ce81
......@@ -40,6 +40,7 @@ class GroupOffer < ApplicationRecord
validates :department, presence: true, if: :internal?
validates :organization, :location, presence: true, if: :external?
validates :active, inclusion: { in: [false] }, if: :terminated?
scope :active, (-> { where(active: true) })
scope :inactive, (-> { where(active: false) })
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment