smart_table 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/smart_table/smart_table_helper.rb +5 -4
- data/lib/smart_table/version.rb +1 -1
- data/smart_table-0.0.11.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd335ecaf1707c840eb7c52bd8576fb19373f727ba40967f084e590c0d39b8b9
|
|
4
|
+
data.tar.gz: b69bd5a66b953a63837753408a5961008924396fae49fe2e364412a123652391
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a188fd25dbb7e9f41880bc7861dae3690951fab0f761e923466f1f00b00d17b765d07d54c6e48e8f38f48104bd89d833e24737019dac5907ba23b43db706030f
|
|
7
|
+
data.tar.gz: b7009d1ba0396435ad123cda2b54f2219f27fbee30322aa0324f9db0964c8500590d5ae3853bbedf81057e0f03b0e66f008624733ddf26382d879a287a895532
|
|
@@ -167,13 +167,14 @@ module SmartTable
|
|
|
167
167
|
# *Array.new(2, "%#{ActiveRecord::Base.sanitize_sql_like(smart_table_params.search)}%")
|
|
168
168
|
# )
|
|
169
169
|
|
|
170
|
-
def smart_table_search
|
|
170
|
+
def smart_table_search(class:nil)
|
|
171
171
|
raise 'smart_table_params must be called on the controller, before using smart_table_search helper' unless get_cached_smart_table_params
|
|
172
172
|
|
|
173
173
|
text_field_tag(
|
|
174
174
|
SEARCH_PARAM,
|
|
175
175
|
get_cached_smart_table_params.search,
|
|
176
|
-
type: 'search', placeholder: I18n.t('smart_table.search'),
|
|
176
|
+
type: 'search', placeholder: I18n.t('smart_table.search'),
|
|
177
|
+
class: 'smart_table_search ' + binding.local_variable_get(:class).to_s # access to class variable must be done this way because 'class' is reserved
|
|
177
178
|
)
|
|
178
179
|
end
|
|
179
180
|
|
|
@@ -194,14 +195,14 @@ module SmartTable
|
|
|
194
195
|
# You are responsible for using the parameters by yourself when loading the
|
|
195
196
|
# records.
|
|
196
197
|
|
|
197
|
-
def smart_table_extra_filters(&block)
|
|
198
|
+
def smart_table_extra_filters(class:nil, &block)
|
|
198
199
|
raise 'smart_table_params must be called on the controller, before using smart_table_extra_filters helper' unless get_cached_smart_table_params
|
|
199
200
|
|
|
200
201
|
content = capture(&block)
|
|
201
202
|
content_tag(:div,
|
|
202
203
|
content,
|
|
203
204
|
id: 'smart_table_extra_filters',
|
|
204
|
-
class: 'smart_table_extra_filters'
|
|
205
|
+
class: 'smart_table_extra_filters ' + binding.local_variable_get(:class).to_s # access to class variable must be done this way because 'class' is reserved
|
|
205
206
|
)
|
|
206
207
|
end
|
|
207
208
|
|
data/lib/smart_table/version.rb
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_table
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henrique Gubert
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-07-
|
|
11
|
+
date: 2018-07-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -187,6 +187,7 @@ files:
|
|
|
187
187
|
- "./lib/smart_table/engine.rb"
|
|
188
188
|
- "./lib/smart_table/version.rb"
|
|
189
189
|
- "./smart_table-0.0.10.gem"
|
|
190
|
+
- "./smart_table-0.0.11.gem"
|
|
190
191
|
- "./smart_table-0.0.7.gem"
|
|
191
192
|
- "./smart_table-0.0.8.gem"
|
|
192
193
|
- "./smart_table-0.0.9.gem"
|