Class: TimeTracking::TimelogCategory

Inherits:
ApplicationRecord show all
Includes:
CaseSensitivity, StripAttribute
Defined in:
app/models/time_tracking/timelog_category.rb

Constant Summary collapse

DEFAULT_COLOR =
::Gitlab::Color.of('#6699cc')

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from ResetOnUnionError

ResetOnUnionError::MAX_RESET_PERIOD

Class Method Summary collapse

Methods included from StripAttribute

#strip_attributes!

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, 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 SensitiveSerializableHash

#serializable_hash

Class Method Details

.find_by_name(namespace_id, name) ⇒ Object



29
30
31
32
# File 'app/models/time_tracking/timelog_category.rb', line 29

def self.find_by_name(namespace_id, name)
  where(namespace: namespace_id)
    .iwhere(name: name)
end