effective_datatables 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/datatable.rb +5 -9
- data/lib/effective_datatables/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab3303e9840fd59709b75a87ee4b6165f44dbb2e
|
4
|
+
data.tar.gz: 64908b59ab4c276098b53b98e273b246dc5262ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e20d80db67245944e54982a9bd7e172aa1fbd26536ee65feb06aeda3f770a7c4b0ae6a56b0585fafeb3a4ce2989d8a4525832c4a8e1f3839496b667c70b3e3ae
|
7
|
+
data.tar.gz: 856f9f5e260bb67e6d73247121f54128ff36051756d4247c8bcb7a9688f331114accc7009b41b5348f21be2ea61263e06a070dd3814e66a2fe9a5060de2f5dbb
|
@@ -314,16 +314,12 @@ module Effective
|
|
314
314
|
cols[name][:column] ||= (sql_table && sql_column) ? "\"#{sql_table.name}\".\"#{sql_column.name}\"" : name
|
315
315
|
cols[name][:width] ||= nil
|
316
316
|
cols[name][:sortable] = true if cols[name][:sortable] == nil
|
317
|
+
cols[name][:type] ||= (belong_tos.key?(name) ? :belongs_to : (sql_column.try(:type).presence || :string))
|
317
318
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
:obfuscated_id
|
323
|
-
else
|
324
|
-
sql_column.try(:type).presence || :string
|
325
|
-
end
|
326
|
-
)
|
319
|
+
if name == 'id' && collection.respond_to?(:deobfuscate)
|
320
|
+
cols[name][:sortable] = false
|
321
|
+
cols[name][:type] = :obfuscated_id
|
322
|
+
end
|
327
323
|
|
328
324
|
cols[name][:filter] = initialize_table_column_filter(cols[name][:filter], cols[name][:type], belong_tos[name])
|
329
325
|
|