Class: ProjectLabel
- Inherits:
-
Label
- Object
- ActiveRecord::Base
- ApplicationRecord
- Label
- ProjectLabel
- Defined in:
- app/models/project_label.rb
Constant Summary collapse
- MAX_NUMBER_OF_PRIORITIES =
1
Constants inherited from Label
Constants included from BaseLabel
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Instance Method Summary collapse
- #preloaded_parent_container ⇒ Object
- #subject_foreign_key ⇒ Object
- #to_reference(target_container = nil, format: :id, full: false) ⇒ Object
Methods inherited from Label
#as_json, #closed_issues_count, #hook_attrs, ids_on_board, left_join_priorities, link_reference_pattern, on_project_board?, #open_issues_count, #open_merge_requests_count, optionally_subscribed_by, pluck_titles, #present, #prioritize!, prioritized, #priority, reference_pattern, reference_prefix, #refresh_markdown_cache, #unprioritize!, #unprioritize_all!, unprioritized
Methods included from BatchNullifyDependentAssociations
#nullify_dependent_associations_in_batches
Methods included from Presentable
Methods included from Subscribable
#lazy_subscription, #set_subscription, #subscribe, #subscribed?, #subscribed_without_subscriptions?, #subscribers, #toggle_subscription, #unsubscribe
Methods included from Referable
#referable_inspect, #reference_link_text, #to_reference_base
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
Methods included from ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Instance Method Details
#preloaded_parent_container ⇒ Object
28 29 30 |
# File 'app/models/project_label.rb', line 28 def preloaded_parent_container association(:project).loaded? ? project : parent_container end |
#subject_foreign_key ⇒ Object
20 21 22 |
# File 'app/models/project_label.rb', line 20 def subject_foreign_key 'project_id' end |
#to_reference(target_container = nil, format: :id, full: false) ⇒ Object
24 25 26 |
# File 'app/models/project_label.rb', line 24 def to_reference(target_container = nil, format: :id, full: false) super(project, target_container: target_container, format: format, full: full) end |