tabulatr2 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tabulatr/data/data.rb +7 -0
- data/lib/tabulatr/rails/action_controller.rb +5 -0
- data/lib/tabulatr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10bb7f9b11788d017d0ae0035e59aeb21661efa924f2a1608e7fdc97548da4a5
|
4
|
+
data.tar.gz: 2dcf4f5668f0d7f8e237835c101d5b4d38ca3c47ba25e8bcda4a8f5b111bd798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64cd6704205289e6e6964aba94768b20e22b54c122f54c019a4ef73184db844b1f64176aeb35da5406b690aea369f0be6d878944cf66db932b8aebf72bb35676
|
7
|
+
data.tar.gz: b3e50dbcc6eef87f3468fc1440a4fcf2e08c5fb56d4cd21bc4333326e6915b8ffb402641eec21ed7e950971ea9f691c940b65e01c6700e1f6d54bcbce70bef2a
|
data/lib/tabulatr/data/data.rb
CHANGED
@@ -139,6 +139,13 @@ class Tabulatr::Data
|
|
139
139
|
# assoc.to_sym
|
140
140
|
end
|
141
141
|
|
142
|
+
def filtered_data(params)
|
143
|
+
apply_filters(filter_params(params))
|
144
|
+
apply_search(search_param(params))
|
145
|
+
apply_sorting(sort_params(params))
|
146
|
+
join_required_tables(params)
|
147
|
+
@relation.distinct
|
148
|
+
end
|
142
149
|
end
|
143
150
|
|
144
151
|
require_relative './dsl'
|
@@ -53,6 +53,11 @@ class ActionController::Base
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
def tabulatr_filtered_data_for(relation)
|
57
|
+
klass = relation.respond_to?(:klass) ? relation.klass : relation
|
58
|
+
klass.tabulatr(relation).filtered_data(params)
|
59
|
+
end
|
60
|
+
|
56
61
|
def batch_params(klass, params)
|
57
62
|
params["#{Tabulatr::Utility.formatted_name(klass.name)}_batch"]
|
58
63
|
end
|
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.10.
|
4
|
+
version: 0.10.3
|
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: 2024-
|
13
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|