Class: Ci::GroupVariable

Inherits:
ApplicationRecord show all
Includes:
HasVariable, HidableVariable, Maskable, RawVariable, HasEnvironmentScope, Limitable, Presentable
Defined in:
app/models/ci/group_variable.rb

Constant Summary

Constants included from Limitable

Limitable::GLOBAL_SCOPE

Constants included from Maskable

Maskable::MASK_AND_RAW_REGEX, Maskable::REGEX

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from HasCheckConstraints

HasCheckConstraints::NOT_NULL_CHECK_PATTERN

Constants included from ResetOnColumnErrors

ResetOnColumnErrors::MAX_RESET_PERIOD

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Presentable

#present

Methods included from Limitable

#exceeds_limits?

Methods included from Maskable

#masked_and_expanded?, #masked_and_raw?, #to_hash_variable

Methods included from HasVariable

#to_hash_variable

Methods included from HasEnvironmentScope

#environment_scope=

Methods inherited from ApplicationRecord

model_name, table_name_prefix

Methods inherited from ApplicationRecord

===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from Organizations::Sharding

#sharding_organization

Methods included from ResetOnColumnErrors

#reset_on_union_error, #reset_on_unknown_attribute_error

Methods included from Gitlab::SensitiveSerializableHash

#serializable_hash

Class Method Details

.sort_by_attribute(method) ⇒ Object



48
49
50
51
52
53
54
55
# File 'app/models/ci/group_variable.rb', line 48

def self.sort_by_attribute(method)
  case method.to_s
  when 'created_at_asc' then order_created_asc
  when 'created_at_desc' then order_created_desc
  when 'key_asc' then order_key_asc
  when 'key_desc' then order_key_desc
  end
end

Instance Method Details

#audit_detailsObject



57
58
59
# File 'app/models/ci/group_variable.rb', line 57

def audit_details
  key
end

#group_ci_cd_settings_pathObject



65
66
67
# File 'app/models/ci/group_variable.rb', line 65

def group_ci_cd_settings_path
  Gitlab::Routing.url_helpers.group_settings_ci_cd_path(group)
end

#group_nameObject



61
62
63
# File 'app/models/ci/group_variable.rb', line 61

def group_name
  group.name
end