filter_form 0.7.5 → 0.7.6

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: c02fef85ca43118d8a79912116762f34a4697403
4
- data.tar.gz: 2a74e4951bfd18c05ae5dab2db0a1e71d0aa3cc1
3
+ metadata.gz: 60ec94ba1b1a1aa0cb2cc368b1a0c4654b45c8f7
4
+ data.tar.gz: 2651771428beb04c1dfa61adc47ace809dbef61d
5
5
  SHA512:
6
- metadata.gz: af4895be95fc2d9eb690bc131a8b0f6760e0438be83cc7f0bf47572233e3eb7e97f1b2d81cae375e94cf6debfb9f3f05120d43ec7b1c8e245681c5345f488dff
7
- data.tar.gz: 52367df473468f29dbcd3fb121100a42e54ece4d99d7028c780efbd7bd5b6f85459a45c678748ee4b0664d5b5d00c0068f034e1575e767a4092ff08fa7d33918
6
+ metadata.gz: b0bb77861a8e00b66326eabd0d324de76e29552b3004f55e130072df1be0b93798b328a252fc99207c615b74ea9d77e15ec3cc35deda3999284511f546a53d78
7
+ data.tar.gz: 8bcc1819bad33b065528148e4620148a4aaf6c89d5848974e0dddc8e24c3beec194d02d7a8a72c00ee50b65f6f1478e82ef1be181b7f0ccab91f5ae3faf39739
@@ -52,7 +52,7 @@ module FilterForm
52
52
 
53
53
  def human_attribute_name
54
54
  if association
55
- association.class_name.constantize.model_name.human
55
+ association.klass.model_name.human
56
56
  else
57
57
  object.klass.human_attribute_name(attribute_name)
58
58
  end
@@ -19,7 +19,7 @@ module FilterForm
19
19
 
20
20
  def input_attribute_name
21
21
  if association
22
- "#{ attribute_name }_id"
22
+ association.foreign_key
23
23
  else
24
24
  super
25
25
  end
@@ -6,7 +6,7 @@ module FilterForm
6
6
  if options[:collection]
7
7
  options[:collection]
8
8
  elsif association
9
- association.class_name.constantize.all
9
+ association.klass.all
10
10
  else
11
11
  object.klass.uniq.pluck(attribute_name)
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module FilterForm
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filter_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Li