Class: TableHelper::BooleanColumn
- Inherits:
-
Column
- Object
- Column
- TableHelper::BooleanColumn
- Includes:
- ActionView::Helpers, ActionView::Helpers::AssetTagHelper, FlexaLib::Helpers::OtherHelpers, Sprockets::Helpers::RailsHelper
- Defined in:
- lib/flexa_lib/table_for_boolean_column.rb
Overview
fim da classe TABLE
Instance Attribute Summary collapse
-
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
Instance Method Summary collapse
Methods included from FlexaLib::Helpers::OtherHelpers
#flexa_boolean_grid, #flexa_column, #flexa_fixed_toolbar, #flexa_flash_message, #flexa_form_horizontal, #flexa_icon_text, #flexa_page_title, #flexa_search_tool, #formata_real
Methods included from ActionView::Helpers::TextFieldDateHelper
#date_text_field, #text_field_date, #text_field_time, #time_text_field
Instance Attribute Details
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
39 40 41 |
# File 'lib/flexa_lib/table_for_boolean_column.rb', line 39 def output_buffer @output_buffer end |
Instance Method Details
#config ⇒ Object
41 42 43 |
# File 'lib/flexa_lib/table_for_boolean_column.rb', line 41 def config Rails.application.config.action_controller if Object.const_defined?("Rails") end |
#content_for(record) ⇒ Object
45 46 47 48 49 |
# File 'lib/flexa_lib/table_for_boolean_column.rb', line 45 def content_for(record) #@callback = Proc.new {|n| boolean(n)} @callback = Proc.new {|n| flexa_boolean_grid(n)} @attr ? @callback.call(record.kind_of?(Hash) ? record[@attr] : record.send(@attr)) : @callback.call(record) end |