ct_table_for 1.0.2 → 1.0.3

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: ee4c048a968042ebb3909b69a45ae079082698350af7714678e032a6f59cddb8
4
- data.tar.gz: bea7445d0dd0cdc74e6b9df76de9d59152bc4fd5fdbddface41e3670db9e43dc
3
+ metadata.gz: 8523e2f6dcca42b3caa3386475ecfbba0ade1498db465cae2f2b34fb72744fd9
4
+ data.tar.gz: b8645c2b0e39f1e95f2cfbcfdbc843b1f06742ae6f860786733a4d632b1e141c
5
5
  SHA512:
6
- metadata.gz: 3797d1adc5fa0ee49b510a74cbafcd8f8d9be35b0403fad2628ee0d18f6947ad14bb752339a2225ca5de462b8bb34a340d9a1a6fea75e9903c6ba5dd2633a5e4
7
- data.tar.gz: 411971b3b1452bc20d54714000eee5e73f122520b7941bcbca377aa392cb5758e179348b42cdc767fe312c3f86b61e7b0684497055a0ef4a019062e8970864a7
6
+ metadata.gz: 36d7fa6124d9c5770c4d962a724aeb1610143e1e928893e68f01c9028d67f65cd2e6854474b70fcc5b11b4e2cb8a59a26fbfe3c67ae9388eee364943720a864b
7
+ data.tar.gz: 0e663abfedee72114e061fdcf240ad3111062601e4f8f08a5c84252ef2e98ccbc65f9950cd0dedd491b70f60e85c1938176ec829037d08b5cdb5d465ed7bbe95
@@ -49,7 +49,7 @@ module CtTableFor
49
49
  html << %Q{<th>}
50
50
  attribute, *params = attribute.split(":")
51
51
  html << if defined?(Ransack) and params.include? "sortable"
52
- if params.length > 1 && !params.include?("l")
52
+ if params.length > 1 && (params & ['l', 'currency']).empty?
53
53
  sort_link(@q, "#{attribute}_#{params.first}", I18n.t("#{attribute.to_s.underscore}_#{params.first}", scope: [:activerecord, :attributes, model.to_s.underscore]).capitalize )
54
54
  else
55
55
  sort_link(@q, attribute, I18n.t("#{attribute}", scope: [:activerecord, :attributes, model.to_s.underscore]).capitalize )
@@ -127,6 +127,8 @@ module CtTableFor
127
127
  when ActiveSupport::TimeWithZone
128
128
  # TODO: value.in_time_zone
129
129
  html << %Q{<code>#{value.strftime("%d/%m/%Y %H:%M:%S")}</code>}
130
+ when Date
131
+ html << %Q{#{value.strftime("%d/%m/%Y")}}
130
132
  when Time
131
133
  # TODO: value.in_time_zone
132
134
  html << %Q{<code>#{value.strftime("%H:%M:%S")}</code>}
@@ -1,3 +1,3 @@
1
1
  module CtTableFor
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ct_table_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustí B.R.
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-07-31 00:00:00.000000000 Z
13
+ date: 2019-08-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails