From f5dcaef3c8771ce3b6ed29d0c3dac1a540c11b6a Mon Sep 17 00:00:00 2001 From: Carlos Goce Date: Sat, 24 Jan 2015 22:48:40 +0100 Subject: Improve simple layout design --- lib/carlosgoce/layout/layouts.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/carlosgoce/layout') diff --git a/lib/carlosgoce/layout/layouts.rb b/lib/carlosgoce/layout/layouts.rb index 65da961..a841e4f 100644 --- a/lib/carlosgoce/layout/layouts.rb +++ b/lib/carlosgoce/layout/layouts.rb @@ -10,10 +10,10 @@ module CarlosGoce Prawn::Document.generate(file) do font_size = 16 - data.each do |k, month| - days = data[k][:formatted_days] - cells = (days).to_a.each_slice(7).to_a - cells.unshift [data[k][:name]] + data[:months].each do |k, month| + days = month[:formatted_days] + cells = days.to_a.each_slice(7).to_a + cells.unshift [month[:name]] tables << make_table(cells, cell_style: {align: :center, size: 7, border_width: 0}) end -- cgit v1.2.3