ct_table_for 1.0.0 → 1.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: d910fc2f6ba2c9ea56176c54d4b60c41d2b1845d13a19020526a919f31560185
4
- data.tar.gz: 4bad6c7c2b9e864e08c8e1bf56a7468b182084c59bb2409f7929c56ac423ae45
3
+ metadata.gz: 3b045f046408715dbc1ee98f68810c7844379ae2b5699278750d274cc2d5a1a7
4
+ data.tar.gz: cdad607f64f10cb43503a04f6df6ccfb1baf40c35205a12cbbe08e1bf1ec68d6
5
5
  SHA512:
6
- metadata.gz: 5f6e7f7af479363af9e82c39a35b9e1432dbf9bfaba43626b36c78e7eb64e86a9ced2eb5e8d9cb1c7ab28e956c0ef92c9713f619dcd711d42e9c555a05109cd7
7
- data.tar.gz: 8340c531da7fd72d62f8305f48960498921c028743abc45b65fb11db3707e4ee6ac0a43b94b9c81af60f9dd74f6664637a3f192518471d6b944bdc90b594d5d0
6
+ metadata.gz: 5528ff153caa87b8bd213e8ad9058ef93a41e91729a3ecbf4b17fdde7e299929851704bb6c09dc5d3bdd2ddff586203bd640ebae669bb2ef7d24fe8f26aed4cc
7
+ data.tar.gz: d18ac4aa9e21d414182a13cefcf42a2272b7147993d9b6815f66f169ec26033eea115c2f5a9058ed891202e818a89f943ebe54ca77cc43a7d3f669aba0c66109
@@ -49,7 +49,11 @@ module CtTableFor
49
49
  html << %Q{<th>}
50
50
  attribute, *params = attribute.split(":")
51
51
  html << if defined?(Ransack) and params.include? "sortable"
52
- sort_link(@q, attribute, I18n.t("#{attribute}", scope: [:activerecord, :attributes, model.to_s.underscore]).capitalize )
52
+ if params.length > 1 && !params.include?("l")
53
+ sort_link(@q, "#{attribute}_#{params.first}", I18n.t("#{attribute.to_s.underscore}_#{params.first}", scope: [:activerecord, :attributes, model.to_s.underscore]).capitalize )
54
+ else
55
+ sort_link(@q, attribute, I18n.t("#{attribute}", scope: [:activerecord, :attributes, model.to_s.underscore]).capitalize )
56
+ end
53
57
  else
54
58
  model.human_attribute_name("#{attribute}")
55
59
  end
@@ -1,3 +1,3 @@
1
1
  module CtTableFor
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
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.0
4
+ version: 1.0.1
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-04-12 00:00:00.000000000 Z
13
+ date: 2019-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails