chaltron 2.0.0 → 2.0.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 454c8be3dc2bbf14389881ba97cf37e75cd935ec85c781e486dfd5f0f94f4004
|
|
4
|
+
data.tar.gz: c2d0332488f6a3841c838dc5c53d1dc2c627d0b6492b891b2558c7aa11979a00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74e2af3a7115738881e3248d7c56007ab5ab3781d343352fd7a0e7de721c67904c0cc489a7cea0ae4f5bd6a3596c1284db6d7beef26beaa77ed99e07efe87a27
|
|
7
|
+
data.tar.gz: af16626a4dc0c050a2158f5df436bb7b7be3110e2ec849712fcfb6af4ce1889eee58ed2f1e9b6fca1a54e2079bef9b485bbdc94959c39a83e15edb1c4c146d91
|
data/lib/chaltron/version.rb
CHANGED
|
@@ -127,31 +127,7 @@ JS
|
|
|
127
127
|
end
|
|
128
128
|
|
|
129
129
|
def setup_ajax_datatables
|
|
130
|
-
|
|
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 = :
|
|
2
|
+
# available options for db_adapter are: :pg, :mysql, :mysql2, :sqlite, :sqlite3
|
|
3
|
+
# config.db_adapter = :pg
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
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.
|
|
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-
|
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|