Class: TableHelpers::EnumerizeFormatter

Inherits:
SimpleFormatter show all
Defined in:
app/utils/table_helpers.rb

Instance Method Summary collapse

Instance Method Details

#format_value(item, format) ⇒ Object



70
71
72
73
74
75
76
77
# File 'app/utils/table_helpers.rb', line 70

def format_value(item, format)
  case format
    when Proc
      format.call(item)
    else
      item.try(:text)
  end
end