Module: Pageflow::ActiveAdminPatches::Views::TableFor
- Defined in:
- lib/pageflow/active_admin_patches/views/table_for.rb
Instance Method Summary collapse
Instance Method Details
#boolean_status_tag_column(name, yes_state = :warning) ⇒ Object
16 17 18 19 20 |
# File 'lib/pageflow/active_admin_patches/views/table_for.rb', line 16 def boolean_status_tag_column(name, yes_state = :warning) status_tag_column(name, [I18n.t('active_admin.status_tag.yes'), '-'], [yes_state, nil]) end |
#row_attributes ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/pageflow/active_admin_patches/views/table_for.rb', line 5 def row_attributes @collection.each_with_index do |item, i| tr = @tbody.children[i] attributes = yield(item) attributes[:class] = [tr.attributes[:class], attributes[:class]].compact.join(' ') tr.attributes.merge!(attributes) end end |