index_for 0.0.9 → 0.1.0
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 +4 -4
- data/lib/index_for/attribute.rb +4 -2
- data/lib/index_for/builders/body_column_builder.rb +1 -1
- data/lib/index_for/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 320b8fec48df235b14a8e797e086e4da2f431f7e
|
|
4
|
+
data.tar.gz: 5d4c4600d8125cc3f3d99e2ddce6da0d95934d7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a66c9303baa5a89ee30ec777fa95d5f33fb43e364d33e6160023148da5f3fa77aaad07d08d75eea05e1d246d85cad34123b88005e9ff5ec67b56901d5437295
|
|
7
|
+
data.tar.gz: 853c4cc0982705c336f1b21ad737c03abbfc6a4e9f00a834c19d4b229360e1c0fd88007bfdd70e956835fa2779e99ea2eae252925c6507fbf71aa761f537809c
|
data/lib/index_for/attribute.rb
CHANGED
|
@@ -3,7 +3,7 @@ module IndexFor
|
|
|
3
3
|
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
def attribute_value attribute_name, options
|
|
6
|
+
def attribute_value attribute_name, options, &block
|
|
7
7
|
attribute_name = options[:value] if options[:value]
|
|
8
8
|
attribute_name = :"#{attribute_name}.#{options[:with]}" if options[:with]
|
|
9
9
|
|
|
@@ -15,7 +15,9 @@ module IndexFor
|
|
|
15
15
|
object = object.send(attribute_name)
|
|
16
16
|
end if parts.any?
|
|
17
17
|
|
|
18
|
-
if
|
|
18
|
+
if block
|
|
19
|
+
nil
|
|
20
|
+
elsif object.respond_to?(:"human_#{attribute_name}")
|
|
19
21
|
object.send :"human_#{attribute_name}"
|
|
20
22
|
else
|
|
21
23
|
object.send(attribute_name)
|
|
@@ -6,7 +6,7 @@ module IndexFor
|
|
|
6
6
|
def attribute attribute_name, options = {}, &block
|
|
7
7
|
append_html_class options, attribute_class_name(attribute_name)
|
|
8
8
|
wrap_content_with :table_body_cell, attribute_value(attribute_name,
|
|
9
|
-
options), options, &block
|
|
9
|
+
options, &block), options, &block
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def actions *action_names, &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.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Theo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|