lib/tabulatr/renderer/column.rb in tabulatr2-0.9.40 vs lib/tabulatr/renderer/column.rb in tabulatr2-0.9.41

- old
+ new

@@ -106,9 +106,22 @@ when nil then self.col_options.filter = :exact else raise "Unknown filter type for #{self.name}: »#{typ}«" end end + def to_json + { + name: "#{table_name}:#{name}", + # name: name, + header: human_name, + # klassname: klassname, + # table_name: table_name, + filter: col_options.filter, + sortable: col_options.sortable, + data_html: col_options.data_html, + header_html: col_options.header_html, + } + end private def filter_type_for_integer if self.klass.respond_to?(:defined_enums) && self.klass.defined_enums.keys.include?(self.name.to_s)