css_grid 2.7.11 → 2.7.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/css_grid/version.rb +1 -1
- data/lib/css_grid.rb +3 -2
- metadata +1 -1
data/lib/css_grid/version.rb
CHANGED
data/lib/css_grid.rb
CHANGED
@@ -80,7 +80,8 @@ module GridHelper
|
|
80
80
|
collection_length = TWELVE_STRING_INTS[col_number]
|
81
81
|
span_width = @span_width || TWELVE_STRING_INTS_INVERT[(options.delete(:nested_width) || 12) / (collection_length + (options[:spans][:prepend] || 0) + (options[:spans][:append] || 0))]
|
82
82
|
|
83
|
-
rows =
|
83
|
+
rows = []
|
84
|
+
(options.delete(:collection) || [1]).in_groups_of(collection_length, false) do |collection_mini|
|
84
85
|
cols = collection_mini.map do |elt|
|
85
86
|
@elt = elt
|
86
87
|
|
@@ -98,7 +99,7 @@ module GridHelper
|
|
98
99
|
end
|
99
100
|
@elt = nil
|
100
101
|
|
101
|
-
grid(:row, options[:rows].clone){ cols.reduce(:safe_concat) }
|
102
|
+
rows << grid(:row, options[:rows].clone){ cols.reduce(:safe_concat) }
|
102
103
|
end
|
103
104
|
|
104
105
|
safe_buffer = rows.reduce(:safe_concat)
|