Class: IndexFor::ListColumnBuilder
- Defined in:
- lib/index_for/builders/list_column_builder.rb
Instance Attribute Summary
Attributes inherited from Builder
#html_options, #object, #template
Instance Method Summary collapse
- #attribute(attribute_name, options = {}, &block) ⇒ Object
- #list_content(attribute_name, options, &block) ⇒ Object
- #list_label(attribute_name, options) ⇒ Object
Methods inherited from Builder
#actions, #association, #attributes, #fields_for, #initialize
Constructor Details
This class inherits a constructor from IndexFor::Builder
Instance Method Details
#attribute(attribute_name, options = {}, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/index_for/builders/list_column_builder.rb', line 6 def attribute attribute_name, = {}, &block = [:html] = [:label_html] label = list_label attribute_name, = [:html] = [:content_html] content = list_content attribute_name, , &block = [:html] = [:row_html] wrap_with :list_row, label + content, end |
#list_content(attribute_name, options, &block) ⇒ Object
25 26 27 28 |
# File 'lib/index_for/builders/list_column_builder.rb', line 25 def list_content attribute_name, , &block append_html_class , attribute_class_name(attribute_name) wrap_attribute_with :list_content, attribute_name, , &block end |
#list_label(attribute_name, options) ⇒ Object
20 21 22 23 |
# File 'lib/index_for/builders/list_column_builder.rb', line 20 def list_label attribute_name, append_html_class , attribute_class_name(attribute_name) wrap_with :list_label, attribute_label(attribute_name, ), end |