cartodb-4.42/app/models/carto/feature_flag.rb

13 lines
320 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module Carto
class FeatureFlag < ActiveRecord::Base
has_many :feature_flags_user, dependent: :destroy
has_many :users, through: :feature_flags_user
scope :restricted, -> { where(restricted: true) }
scope :not_restricted, -> { where(restricted: false) }
validates :name, presence: true
end
end