display_for 0.1.6 → 0.1.7
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.
- data/VERSION +1 -1
- data/display_for.gemspec +2 -2
- data/lib/display_for/builder/table.rb +1 -1
- data/lib/display_for/builder/view.rb +2 -2
- data/spec/lib/builder/table_spec.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/display_for.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "display_for"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mateo Murphy"]
|
12
|
-
s.date = "2012-10-
|
12
|
+
s.date = "2012-10-22"
|
13
13
|
s.description = "A Rails library for display data, in tabular and other formats"
|
14
14
|
s.email = "mateo.murphy@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -4,7 +4,7 @@ module DisplayFor
|
|
4
4
|
def build_header
|
5
5
|
result = ''
|
6
6
|
@attributes.each do |attribute|
|
7
|
-
result << content_tag(:th, attribute.label(@resource_class), :class => "#{
|
7
|
+
result << content_tag(:th, attribute.label(@resource_class), :class => "col_#{attribute.name}".underscore)
|
8
8
|
end
|
9
9
|
result << content_tag(:th, "Actions", :class => 'actions') if @actions.any?
|
10
10
|
|
@@ -6,8 +6,8 @@ module DisplayFor
|
|
6
6
|
def build_header
|
7
7
|
result = ''
|
8
8
|
|
9
|
-
result << content_tag(:th, "Attribute")
|
10
|
-
result << content_tag(:th, "Value")
|
9
|
+
result << content_tag(:th, "Attribute", :class => "col_attribute")
|
10
|
+
result << content_tag(:th, "Value", :class => "col_value")
|
11
11
|
|
12
12
|
content_tag(:thead, content_tag(:tr, result.html_safe)) << "\n"
|
13
13
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
OUTPUT = %q|<table class="table table-bordered table-striped test_model-table"><thead><tr><th class="
|
3
|
+
OUTPUT = %q|<table class="table table-bordered table-striped test_model-table"><thead><tr><th class="col_id">id</th><th class="col_first_name">first_name</th><th class="col_last_name">last_name</th></tr></thead>
|
4
4
|
<tbody><tr id="test_model_1"><td>1</td><td>foo</td><td>bar</td></tr>
|
5
5
|
</tbody><tfoot><tr><td colspan="3"> </td></tr>
|
6
6
|
</tfoot></table>|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: display_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -157,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
segments:
|
159
159
|
- 0
|
160
|
-
hash:
|
160
|
+
hash: 331432208825885997
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|