index_for 0.0.7 → 0.0.8

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: 18c31005587f3bedfbab9a622616b09f6a10c7f2
4
- data.tar.gz: 1a69fafc0bd2ddb8f07c8a122372b4e97c8ad615
3
+ metadata.gz: 177a8e4c7f05105e1f26e7cb2c6ddc7a7579f609
4
+ data.tar.gz: 3eb525f29ab950319344f0caf0a33e18dd787032
5
5
  SHA512:
6
- metadata.gz: 6abd1286e045ccac6e49a459275aa618d270d2d621619c77234742fd640e6d7cbdae69dd6016f22d59a45b536a88e18f09b3f41c1dc71d70e9406453c734c3ac
7
- data.tar.gz: b0ca84313a529dc5857de9f7b018dc5c4b3d0f860a3a2409b7cc25a49417d4750086c5854783ab2a047afa2d6cd36bd097a237ce16f1dc6e2f50b0f123121cb0
6
+ metadata.gz: d2583d27d3d21467833e899f6fc1bc0504919b689e55e81699a9973342147a4881bb91c035ad85577fbf92b22590998125cee2d4d78a3ad73d66f15cb218eb45
7
+ data.tar.gz: aeb75c62225dec9723fd59dc64093e596c274afd4ccbb7862af5635146d3d82543e4f2b8d5d613d033d9d7d1646a725e99d15171a52a5e6afc407349c1e539ca
@@ -24,8 +24,9 @@ module IndexFor
24
24
  options.key?(:if_raise) ? options[:if_raise] : raise
25
25
  end
26
26
 
27
- def attribute_label attribute_name
28
- model_class = html_options[:model] || @object.class
27
+ def attribute_label attribute_name, options
28
+ return options[:label] if options[:label]
29
+ model_class = options[:model] || html_options[:model] || @object.class
29
30
  model_class.human_attribute_name(attribute_name)
30
31
  end
31
32
 
@@ -5,7 +5,7 @@ module IndexFor
5
5
 
6
6
  def attribute attribute_name, options = {}
7
7
  append_html_class options, attribute_class_name(attribute_name)
8
- wrap_with :table_head_cell, attribute_label(attribute_name), options
8
+ wrap_with :table_head_cell, attribute_label(attribute_name, options), options
9
9
  end
10
10
 
11
11
  def actions *action_names
@@ -19,7 +19,7 @@ module IndexFor
19
19
 
20
20
  def list_label attribute_name, options
21
21
  append_html_class options, attribute_class_name(attribute_name)
22
- wrap_with :list_label, attribute_label(attribute_name), options
22
+ wrap_with :list_label, attribute_label(attribute_name, options), options
23
23
  end
24
24
 
25
25
  def list_content attribute_name, options, &block
@@ -1,3 +1,3 @@
1
1
  module IndexFor
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: index_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2015-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel