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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9cea6bc67e401e50f426c16511c169bb200d70e0cd62a12bb631d1b53b6c4d0
4
- data.tar.gz: 3347a4426f70eb1d77404177cb9825b836351e54f9dfaf85b048191668889e3e
3
+ metadata.gz: fd335ecaf1707c840eb7c52bd8576fb19373f727ba40967f084e590c0d39b8b9
4
+ data.tar.gz: b69bd5a66b953a63837753408a5961008924396fae49fe2e364412a123652391
5
5
  SHA512:
6
- metadata.gz: b26e856a7fce2cbd9768875d7c0495a1b8e876f29d95059e9412eeb1e05f0127c859624db21c5a8a5ad70cde8152584a3c10736c218544e05b9324b7c94bacfd
7
- data.tar.gz: b251447515d889366ec6b4d46028076e5f5a9615421b61e39f29c511a05f3c0f34f684b57e18db07c7a6bda96f67c309f06c00d287fbe29c5ce2d29e16ba11fc
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'), class: '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
 
@@ -1,3 +1,3 @@
1
1
  module SmartTable
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
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.11
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-26 00:00:00.000000000 Z
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"