tabulatr2 0.9.40 → 0.9.41

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae1a361564e5e09da6f27ce3803f2e45b980b958a7716798372da8f0c6f609cd
4
- data.tar.gz: b1484c767ee360602179fd08ccfd499988d455a570d6fb589101e180c4e41c7f
3
+ metadata.gz: 4d56242840b7333c103911c17c94c35986e779a141623a27187c61981b5242d1
4
+ data.tar.gz: 87ebb4da7f34266535e8d7a9378b7a9b056b6efc11c73fc126c5715286ca1ad8
5
5
  SHA512:
6
- metadata.gz: 23b19980985effeceab7e1a677823e7e19909b86bb63a7e5a86848652dd2ea6ec8faee21f365c5e4844ed23830fbc2cf7f3f64e94de4c296226af74a769991b0
7
- data.tar.gz: c01ab2d6f7973ebdaaca99671d67d842f3010377db6a323468c5b19e6d7bf1aa48963cb976447573032a350324b6556e98970d9cddcca0fa8bf6c89b234890e3
6
+ metadata.gz: e3b7821bce09f5218a04bd3f89467cb2f678e7ae8a185513b20411d4bbd1ea0f2328f2f335392ae1ee045f7f958b804ba71b1ac5b5ffdb66c00e16c910e659f6
7
+ data.tar.gz: caaa50e7ef7c6edf8c23fb869d80205c258297a2fc84197d6f9eb35051404bcba463147705a9846668cf241e2f86d5bd7a9969d434c607b15b1641ed23d429e7
@@ -108,6 +108,19 @@ class Tabulatr::Renderer::Column
108
108
  end
109
109
  end
110
110
 
111
+ def to_json
112
+ {
113
+ name: "#{table_name}:#{name}",
114
+ # name: name,
115
+ header: human_name,
116
+ # klassname: klassname,
117
+ # table_name: table_name,
118
+ filter: col_options.filter,
119
+ sortable: col_options.sortable,
120
+ data_html: col_options.data_html,
121
+ header_html: col_options.header_html,
122
+ }
123
+ end
111
124
 
112
125
  private
113
126
 
@@ -99,6 +99,10 @@ class Tabulatr::Renderer
99
99
  new(klass, view, toptions).build_table(columns, filters, tabulatr_data_class, &block)
100
100
  end
101
101
 
102
+ def columns_json(tabulatr_data_class_name=nil)
103
+ get_data_class(tabulatr_data_class_name).table_columns.map(&:to_json)
104
+ end
105
+
102
106
  private
103
107
 
104
108
  def get_requested_columns(available_columns, requested_columns)
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.40"
25
+ VERSION = "0.9.41"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabulatr2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.40
4
+ version: 0.9.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Horn
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-09 00:00:00.000000000 Z
13
+ date: 2020-05-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubygems_version: 3.0.3
282
+ rubygems_version: 3.0.6
283
283
  signing_key:
284
284
  specification_version: 4
285
285
  summary: A tight DSL to build tables of ActiveRecord models with sorting, pagination,