Class: Operations::FeatureFlags::Strategy

Inherits:
ApplicationRecord show all
Defined in:
app/models/operations/feature_flags/strategy.rb

Constant Summary collapse

STRATEGY_DEFAULT =
'default'
STRATEGY_GITLABUSERLIST =
'gitlabUserList'
STRATEGY_GRADUALROLLOUTUSERID =
'gradualRolloutUserId'
STRATEGY_USERWITHID =
'userWithId'
STRATEGIES =
{
  STRATEGY_DEFAULT => [].freeze,
  STRATEGY_GITLABUSERLIST => [].freeze,
  STRATEGY_GRADUALROLLOUTUSERID => %w[groupId percentage].freeze,
  STRATEGY_USERWITHID => ['userIds'].freeze
}.freeze
USERID_MAX_LENGTH =
256

Instance Method Summary collapse

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#user_list_id=(user_list_id) ⇒ Object


38
39
40
# File 'app/models/operations/feature_flags/strategy.rb', line 38

def user_list_id=(user_list_id)
  self.user_list = ::Operations::FeatureFlags::UserList.find(user_list_id)
end