chaltron 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aefae6179b039a391256431f1581b0a57d28abf2a3c4edb33f9541368f30e3b8
4
- data.tar.gz: 4e8d46b611a4874dd2f3f5399ab24a08fdcf85c5434cb04b194ef8bb45fa0bb3
3
+ metadata.gz: 454c8be3dc2bbf14389881ba97cf37e75cd935ec85c781e486dfd5f0f94f4004
4
+ data.tar.gz: c2d0332488f6a3841c838dc5c53d1dc2c627d0b6492b891b2558c7aa11979a00
5
5
  SHA512:
6
- metadata.gz: f69e5c6708976f4e2448c5820584039685b4c6e61b2cc6162fb68759fb3f2e72e670a399eea0927f7fe16f3ebe56ea06d9c6a02a19d10394b962c06c33e596ce
7
- data.tar.gz: 90dfb275ad24a7d88405c16c772227f8367f1d1c619c2bd0c7f129f711eb2cf431a338729d900c8b3146208d86148a2d9af28ed08b825eb5249a28ca5b1aea7f
6
+ metadata.gz: 74e2af3a7115738881e3248d7c56007ab5ab3781d343352fd7a0e7de721c67904c0cc489a7cea0ae4f5bd6a3596c1284db6d7beef26beaa77ed99e07efe87a27
7
+ data.tar.gz: af16626a4dc0c050a2158f5df436bb7b7be3110e2ec849712fcfb6af4ce1889eee58ed2f1e9b6fca1a54e2079bef9b485bbdc94959c39a83e15edb1c4c146d91
@@ -1,3 +1,3 @@
1
1
  module Chaltron
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
@@ -127,31 +127,7 @@ JS
127
127
  end
128
128
 
129
129
  def setup_ajax_datatables
130
- ajax_datatables_rails_file = 'config/initializers/ajax_datatables_rails.rb'
131
- copy_file ajax_datatables_rails_file
132
-
133
- # setup ajax-datatables-rails
134
- db_adapter =
135
- case ActiveRecord::Base.connection.adapter_name
136
- when 'Mysql2' then :mysql2
137
- when 'SQLite' then :sqlite3
138
- when 'PostgreSQL' then :pg
139
- else nil
140
- end
141
-
142
- if db_adapter.nil?
143
- message =<<EOF
144
- PAY ATTENTION!
145
- ajax-datatables-rails gem (needed by chaltron) does not support #{options[:database]}.
146
- See https://github.com/antillas21/ajax-datatables-rails#searching-on-non-text-based-columns.
147
- You may experience problems!
148
- EOF
149
- say message
150
- else
151
- gsub_file ajax_datatables_rails_file,
152
- /# config.db_adapter = :mysql2/, "config.db_adapter = :#{db_adapter}"
153
- end
154
-
130
+ copy_file 'config/initializers/ajax_datatables_rails.rb'
155
131
  end
156
132
 
157
133
  private
@@ -1,7 +1,7 @@
1
1
  AjaxDatatablesRails.configure do |config|
2
- # available options for db_adapter are: :pg, :mysql2, :sqlite3
3
- # config.db_adapter = :mysql2
2
+ # available options for db_adapter are: :pg, :mysql, :mysql2, :sqlite, :sqlite3
3
+ # config.db_adapter = :pg
4
4
 
5
- # available options for paginator are: :simple_paginator, :kaminari, :will_paginate
6
- # config.paginator = :simple_paginator
5
+ # Or you can use your rails environment adapter if you want a generic dev and production
6
+ config.db_adapter = Rails.configuration.database_configuration[Rails.env]['adapter'].to_sym
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chaltron
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vicvega
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails