table-for 3.5.0 → 3.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9751a4f3656971cf37a04524b681722bfc6fcf1
4
- data.tar.gz: d77d7951df1fa1f1bd74da3150fb3d6f992fcab3
3
+ metadata.gz: fce5617d62755ddab8e61726c5f7eef02538bac2
4
+ data.tar.gz: 588eead2c7aea2c34fd06fc37f9c689b8e8d330c
5
5
  SHA512:
6
- metadata.gz: 97340910721e9cda2be1ae4b0f1f5a39eefb55cb5b555d2c222340a17a138376ad15b61da245e7f0b23b295a45dbb1d9c3ba8a72c0523a02961f1990b5652d5d
7
- data.tar.gz: d2138119120ae4125872b464f6bc413106a522a8be157e838527b1f269a61380f2a3c948220af5676d5c49e9eb7353de19bd95561234b557db629a1da7c5e00a
6
+ metadata.gz: 301a073938275f7369266fab2147b313671003e4c748ae4d9062ddd764abaee6e9e29cc8e94a860f800ce543aa4a512e9181198253764263f45e4e42a9d7d0c5
7
+ data.tar.gz: 2262926933d7dcab1c4c330996fcad9446e7afcdfae25750200b0777a671c94ff5e1536adf9e168d3d6c9f7d74b21d211b78e7e8a879ce2267fb74f4e087633c
@@ -1,3 +1,6 @@
1
+ 3.6.0
2
+ * Generated td tags will collapse all whitespace per suggestion by @jlfy.
3
+
1
4
  3.5.0
2
5
  * table_for now keeps track of the current index of the row being render, per
3
6
  suggestion by @jlfy. Example:
@@ -43,15 +43,18 @@
43
43
  <% end %>
44
44
 
45
45
  <% table.define :data_column do |column, record, options| %>
46
- <%= content_tag :td, table.call_each_hash_value_with_params(options[:data_column_html], record, column) do %>
47
- <%= table.render column.name, record, column, column.options %>
48
- <% end %>
46
+ <%= content_tag :td,
47
+ table.call_each_hash_value_with_params(options[:data_column_html],
48
+ record,
49
+ column) do
50
+ table.render(column.name, record, column, column.options)
51
+ end %>
49
52
  <% end %>
50
53
 
51
54
  <%# Define a block for each column, named using that column's name %>
52
- <% table.define lambda {|column| column.name }, :collection => table.columns, :link_html => {} do |record, column, options| %>
53
- <%= table.cell_content(record, column, options) %>
54
- <% end %>
55
+ <% table.define lambda {|column| column.name }, :collection => table.columns, :link_html => {} do |record, column, options| -%>
56
+ <%= table.cell_content(record, column, options) -%>
57
+ <% end -%>
55
58
 
56
59
  <% table.define :footer do |options| %>
57
60
  <%= table.content_tag_with_block options[:tfoot_tag], options[:tfoot_html] do %>
@@ -1,3 +1,3 @@
1
1
  module TableFor
2
- VERSION = "3.5.0"
2
+ VERSION = "3.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table-for
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hunter