table.table.table-expandable.client-table cellpadding='0' cellspacing='0' - if @rows.present? tr - @rows[0].each_with_index do |header,index| th = index.zero? ? 'Row Number' : header - @rows[1..-1].each_with_index do |row,outer_index| tr - row.each_with_index do |data,index| td = index.zero? ? data.to_i : (text_field_tag "#{@config[:model_name]}[#{outer_index}][]", data,required: @config[:column_validations][@config[:column_names][index]].to_h[:required])