Sha256: 3b1f443b9d52419f0bd7f642de7d10dc780e32863ae1437613832e18a81bd3e0
Contents?: true
Size: 391 Bytes
Versions: 6
Compression:
Stored size: 391 Bytes
Contents
module FeatureGate class GatedFeature < ActiveRecord::Base validates :name, presence: true validates :gated, inclusion: { in: [true, false] } scope :opened, -> { where(gated: false) } scope :closed, -> { where(gated: true) } def deploy_feature! self.gated = false save! end def gate_feature! self.gated = true save! end end end
Version data entries
6 entries across 6 versions & 1 rubygems