index_for 0.0.7 → 0.0.8
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 177a8e4c7f05105e1f26e7cb2c6ddc7a7579f609
|
|
4
|
+
data.tar.gz: 3eb525f29ab950319344f0caf0a33e18dd787032
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2583d27d3d21467833e899f6fc1bc0504919b689e55e81699a9973342147a4881bb91c035ad85577fbf92b22590998125cee2d4d78a3ad73d66f15cb218eb45
|
|
7
|
+
data.tar.gz: aeb75c62225dec9723fd59dc64093e596c274afd4ccbb7862af5635146d3d82543e4f2b8d5d613d033d9d7d1646a725e99d15171a52a5e6afc407349c1e539ca
|
data/lib/index_for/attribute.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
data/lib/index_for/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|