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 CHANGED
@@ -1,3 +1,7 @@
1
+ 0.0.6
2
+ -----
3
+ * Added support for `:html` option.
4
+
1
5
  0.0.5
2
6
  -----
3
7
  * New option for checkboxes: `checked`.
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
- content_tag(:table, class: cls) do
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
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module HtmlTables
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
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.5
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-22 00:00:00.000000000 Z
12
+ date: 2013-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n