filter_form 0.7.4 → 0.7.5

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
  SHA1:
3
- metadata.gz: 9adbbae8d73480ce1fce2c02e2f3167c0e677291
4
- data.tar.gz: 5e95a42a620c695cf4b5f91899383f9db2e2e760
3
+ metadata.gz: c02fef85ca43118d8a79912116762f34a4697403
4
+ data.tar.gz: 2a74e4951bfd18c05ae5dab2db0a1e71d0aa3cc1
5
5
  SHA512:
6
- metadata.gz: b37bcbbd277860589cf14bbf230ff745405ad1bd513281bf9d44fe852b4d33e1f088a7767318867a8acf0b2ad7629eded4bfc9a93eb5daae75752c99cd9eefbe
7
- data.tar.gz: 33c0fdf413e10311e28f5b563d2a5373b59cfcce48f6710a425eb05cb59cc373aaeda992d4b3b4c8045474c62bbeab6abc658ba1fdb642a457638644ab4cf9e8
6
+ metadata.gz: af4895be95fc2d9eb690bc131a8b0f6760e0438be83cc7f0bf47572233e3eb7e97f1b2d81cae375e94cf6debfb9f3f05120d43ec7b1c8e245681c5345f488dff
7
+ data.tar.gz: 52367df473468f29dbcd3fb121100a42e54ece4d99d7028c780efbd7bd5b6f85459a45c678748ee4b0664d5b5d00c0068f034e1575e767a4092ff08fa7d33918
@@ -51,7 +51,15 @@ module FilterForm
51
51
  end
52
52
 
53
53
  def human_attribute_name
54
- object.klass.human_attribute_name(attribute_name)
54
+ if association
55
+ association.class_name.constantize.model_name.human
56
+ else
57
+ object.klass.human_attribute_name(attribute_name)
58
+ end
59
+ end
60
+
61
+ def association
62
+ object.klass.reflections[attribute_name]
55
63
  end
56
64
 
57
65
  def current_predicate
@@ -11,10 +11,6 @@ module FilterForm
11
11
  object.klass.uniq.pluck(attribute_name)
12
12
  end
13
13
  end
14
-
15
- def association
16
- object.klass.reflections[attribute_name]
17
- end
18
14
  end
19
15
  end
20
16
  end
@@ -1,3 +1,3 @@
1
1
  module FilterForm
2
- VERSION = '0.7.4'
2
+ VERSION = '0.7.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filter_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2013-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_form