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 +4 -4
- data/lib/tabulatr/renderer/column.rb +13 -0
- data/lib/tabulatr/renderer/renderer.rb +4 -0
- data/lib/tabulatr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d56242840b7333c103911c17c94c35986e779a141623a27187c61981b5242d1
|
4
|
+
data.tar.gz: 87ebb4da7f34266535e8d7a9378b7a9b056b6efc11c73fc126c5715286ca1ad8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/tabulatr/version.rb
CHANGED
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.
|
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:
|
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.
|
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,
|