Class: Comee::Core::Unit

Inherits:
ApplicationRecord show all
Defined in:
app/models/comee/core/unit.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ransackable_attributes(_auth_object = nil) ⇒ Object



17
18
19
# File 'app/models/comee/core/unit.rb', line 17

def self.ransackable_attributes(_auth_object = nil)
  %w[id code name unit_type]
end

Instance Method Details

#downcase_aliasesObject



11
12
13
14
15
# File 'app/models/comee/core/unit.rb', line 11

def downcase_aliases
  return if aliases.count.zero? || aliases.nil?

  aliases.map(&:downcase!)
end