effective_datatables 1.1.4 → 1.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 039eb94ab3a7903478a9f1bd0042c9904a323c05
|
4
|
+
data.tar.gz: b409d5677a63a0bd6e42684288f11fc5fa5173c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 158e7ea9aae978a0e817e7a259a858e78fd355b9effdcd5f70d9049415abdd1763c7fb9a2dac58368052e54319c02a8effaa399649739c4a34083236ddf1d934
|
7
|
+
data.tar.gz: 3c2d39b4d0b5eb7fd8a469f03b3aa287497b0720fef35bed3036076c8680eb40402a3dba11ec150c62a485869bf397e3ae16941048eddb2c47a2dfd55ead48a7
|
@@ -239,11 +239,11 @@ module Effective
|
|
239
239
|
# Last minute formatting of dates
|
240
240
|
case value
|
241
241
|
when Date
|
242
|
-
value.strftime(
|
242
|
+
value.strftime(EffectiveDatatables.date_format)
|
243
243
|
when Time
|
244
|
-
value.strftime(
|
244
|
+
value.strftime(EffectiveDatatables.datetime_format)
|
245
245
|
when DateTime
|
246
|
-
value.strftime(
|
246
|
+
value.strftime(EffectiveDatatables.datetime_format)
|
247
247
|
else
|
248
248
|
value
|
249
249
|
end
|
data/lib/effective_datatables.rb
CHANGED
@@ -20,4 +20,11 @@ EffectiveDatatables.setup do |config|
|
|
20
20
|
# config.authorization_method = false
|
21
21
|
|
22
22
|
config.authorization_method = Proc.new { |controller, action, resource| true } # All users can see every screen
|
23
|
+
|
24
|
+
# Date & DateTime Format
|
25
|
+
# By default, format Date and DateTime values with the following
|
26
|
+
config.date_format = "%Y-%m-%d"
|
27
|
+
config.datetime_format = "%Y-%m-%d %H:%M"
|
28
|
+
|
29
|
+
|
23
30
|
end
|