Class: TableHelper::SimpleColumn
- Defined in:
- lib/table_for/simple_column.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Column
Instance Method Summary collapse
Methods inherited from Column
Constructor Details
This class inherits a constructor from TableHelper::Column
Instance Method Details
#content_for(record) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/table_for/simple_column.rb', line 3 def content_for(record) called_record = record.kind_of?(Hash) ? record[@attr] : record.send(@attr) if @options[:time_format] and called_record.is_a? Time called_record = called_record.strftime(@options[:time_format]) end called_record.to_s end |