trk_datatables 0.1.13 → 0.1.14

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: 5853f301e71b106e9247daa348089c09e83483941bf58c1942ceeb7ed6164d2a
4
- data.tar.gz: 3a52bcaede0173fb3b2e2775b98b730b53bcc0a910ed7842c36209c157d9e789
3
+ metadata.gz: 8c62f6190d44143f7d76ef88fce49357c06a2e693bc96164cb678f0f5935f817
4
+ data.tar.gz: 3a5ab2c6e062acd588484e3907e135875ab688c5ff88b4c075f0e42f785a00b8
5
5
  SHA512:
6
- metadata.gz: d082b24de7ca732c2e2321abd0a0a819dc6e47f00ea042777a938e22cdaee615cb50aec5242bae4c8ec9df41fa53602138041a924c65ecea35b1c937f60b5825
7
- data.tar.gz: ed5c13d6845572a90c2bc261d06b585ce1290ac7d498befdf640d2f45ab4e9ccf9eda4c4e2e993454f8a66c6be860051471e236b645eb44372a398df0934e406
6
+ metadata.gz: 22dc186b88537bab98e1b36981fcce153e325252935e873b8007a176943e7e48caf5c90868e2bdffe6055bdc171a06f9ed9367fe821eb07bbd801b9e0a9e48a2
7
+ data.tar.gz: c6d7304344a2f174444cc5d6de704d68e4ef6af4ea6a611cd1d5aca7ded896abdd279721245ef9ff2fbe8268af88c02ecdc97a26e79348d96e57e8da2242ed52
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trk_datatables (0.1.13)
4
+ trk_datatables (0.1.14)
5
5
  activesupport
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -488,7 +488,11 @@ side rendering and more advance listing
488
488
 
489
489
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
490
490
 
491
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
491
+ To install this gem onto your local machine, run `bundle exec rake install`. To
492
+ release a new version, update the version number in
493
+ `lib/trk_datatables/version.rb`, and then run `bundle exec rake release`, which
494
+ will create a git tag for the version, push git commits and tags, and push the
495
+ `.gem` file to [rubygems.org](https://rubygems.org).
492
496
 
493
497
  Instead of installing you can point directly to your path
494
498
  ```
@@ -38,7 +38,7 @@ module TrkDatatables
38
38
  STRING_TYPE_CAST_ORACLE = 'VARCHAR2(4000)'.freeze
39
39
 
40
40
  DB_ADAPTER_STRING_TYPE_CAST = {
41
- psql: STRING_TYPE_CAST_POSTGRES,
41
+ postgresql: STRING_TYPE_CAST_POSTGRES,
42
42
  mysql: STRING_TYPE_CAST_MYSQL,
43
43
  mysql2: STRING_TYPE_CAST_MYSQL,
44
44
  sqlite: STRING_TYPE_CAST_SQLITE,
@@ -64,13 +64,13 @@ module TrkDatatables
64
64
  # short notation is when we use array of keys.
65
65
  # In case first element is hash than we will use that hash
66
66
  if cols.is_a? Array
67
- if cols.first.is_a? Hash
68
- cols = cols.first
69
- else
70
- cols = cols.each_with_object({}) do |column_key, hash|
71
- hash[column_key.to_sym] = {}
72
- end
73
- end
67
+ cols = if cols.first.is_a? Hash
68
+ cols.first
69
+ else
70
+ cols.each_with_object({}) do |column_key, hash|
71
+ hash[column_key.to_sym] = {}
72
+ end
73
+ end
74
74
  end
75
75
  _set_data(cols)
76
76
  _set_global_search_cols(global_search_cols)
@@ -87,9 +87,11 @@ module TrkDatatables
87
87
 
88
88
  if table_name.blank?
89
89
  column_name = column_options[TITLE_OPTION] || 'actions' # some default name for a title
90
+ column_options[SEARCH_OPTION] = false
91
+ column_options[ORDER_OPTION] = false
90
92
  else
91
93
  table_class = table_name.singularize.camelcase.constantize
92
- column_type_in_db = _determine_db_type_for_column(table_class, column_name) unless (column_options[SEARCH_OPTION] == false && column_options[ORDER_OPTION] == false)
94
+ column_type_in_db = _determine_db_type_for_column(table_class, column_name) unless column_options[SEARCH_OPTION] == false && column_options[ORDER_OPTION] == false
93
95
  end
94
96
  arr << {
95
97
  column_key: column_key.to_sym,
@@ -1,3 +1,3 @@
1
1
  module TrkDatatables
2
- VERSION = '0.1.13'.freeze
2
+ VERSION = '0.1.14'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trk_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dusan Orlovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport