Class: Redde::IndexHelper::IndexBuilder
- Inherits:
-
Object
- Object
- Redde::IndexHelper::IndexBuilder
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper
- Defined in:
- app/helpers/redde/index_helper.rb
Defined Under Namespace
Classes: IndexCellBuilder, IndexHeadCellBuilder
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
- #empty(options = {}) ⇒ Object
-
#initialize(list, params) ⇒ IndexBuilder
constructor
A new instance of IndexBuilder.
- #thead(insert) ⇒ Object
- #visible ⇒ Object
Constructor Details
#initialize(list, params) ⇒ IndexBuilder
Returns a new instance of IndexBuilder.
145 146 147 148 |
# File 'app/helpers/redde/index_helper.rb', line 145 def initialize(list, params) @list = list @params = params end |
Instance Attribute Details
#list ⇒ Object
Returns the value of attribute list.
143 144 145 |
# File 'app/helpers/redde/index_helper.rb', line 143 def list @list end |
#params ⇒ Object
Returns the value of attribute params.
143 144 145 |
# File 'app/helpers/redde/index_helper.rb', line 143 def params @params end |
Instance Method Details
#empty(options = {}) ⇒ Object
150 151 152 |
# File 'app/helpers/redde/index_helper.rb', line 150 def empty( = {} ) content_tag(:th, "", class: ['list__head', [:class]]) end |
#thead(insert) ⇒ Object
154 155 156 157 158 |
# File 'app/helpers/redde/index_helper.rb', line 154 def thead insert content_tag :thead do content_tag(:tr, empty + visible + insert + empty(class: 'list__head_del') + empty) end end |
#visible ⇒ Object
160 161 162 |
# File 'app/helpers/redde/index_helper.rb', line 160 def visible empty(class: '_eye') if list.column_names.include?('visible') end |