html_tables 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/README.md +1 -1
- data/lib/html_tables/data_table_helper.rb +4 -1
- data/lib/html_tables/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
HAML example:
|
22
22
|
|
23
|
-
= data_table_for(@products, name: :products_table) do |t|
|
23
|
+
= data_table_for(@products, name: :products_table, html: { class: 'custom_table' }) do |t|
|
24
24
|
- t.group_by(:category) do |cat|
|
25
25
|
%em= cat.name
|
26
26
|
- t.column(:code, align: :center, width: '9em')
|
@@ -12,7 +12,10 @@ module HtmlTables
|
|
12
12
|
|
13
13
|
cls = %w(table table-striped table-bordered)
|
14
14
|
cls << 'table-condensed' if options[:condensed]
|
15
|
-
|
15
|
+
cls << options[:class] if options[:class]
|
16
|
+
table_html_options = { class: cls }
|
17
|
+
table_html_options.merge!(options[:html]) { |_, v1, v2| [v1, v2].flatten } if options[:html]
|
18
|
+
content_tag(:table, table_html_options) do
|
16
19
|
content_tag(:caption, options[:caption] || controller_name, class: ('hidden' unless options[:caption])) +
|
17
20
|
content_tag(:colgroup) do
|
18
21
|
b = ''.html_safe
|
data/lib/html_tables/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_tables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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: 2013-01-
|
12
|
+
date: 2013-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|