Module: StringHelper

Included in:
ApplicationHelper, Customer, Task
Defined in:
lib/active_extend/string_helper.rb

Instance Method Summary collapse

Instance Method Details

#name_or_empty(instance) ⇒ Object



2
3
4
# File 'lib/active_extend/string_helper.rb', line 2

def name_or_empty(instance)
  instance ? instance.name.upcase : I18n.t('helpers.empty')
end

#name_or_nothing(instance) ⇒ Object



6
7
8
# File 'lib/active_extend/string_helper.rb', line 6

def name_or_nothing(instance)
  instance ? instance.name.upcase : ""
end