Sha256: cab5654a9543b65e661ff35c5858cac9b31d91f1976002d5553b20102ac5e7ab
Contents?: true
Size: 754 Bytes
Versions: 1
Compression:
Stored size: 754 Bytes
Contents
# frozen_string_literal: true module Capybara module ActiveAdmin module Selectors module Table def table_selector(model) return 'table.index_table' if model.nil? "table.index_table#index_table_#{model.to_s.pluralize}" end def table_row_selector(model, record_id) return 'tbody > tr' if record_id.nil? "tbody > tr##{model.to_s.singularize}_#{record_id}" end def table_header_selector 'thead > tr > th.col' end def table_cell_selector(column) column = column.to_s.gsub(' ', '_').downcase unless column.nil? return 'td.col' if column.nil? "td.col.col-#{column}" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara_active_admin-0.2.0 | lib/capybara/active_admin/selectors/table.rb |