nnev / kzeen-wo-ist-die-pizza

pizza <3 | UNMAINTAINED / ABANDONED, pls see pizza4c
ISC License
5 stars 1 forks source link

Fix #5 -- Add size column to PDF output #6

Closed raphaelm closed 6 years ago

raphaelm commented 6 years ago

This fixes #5

breunigs commented 6 years ago

LGTM, but let's Ruby it up:

raphaelm commented 6 years ago

double space instead of tabs :)

Fixed!

the if is actually not needed. present? simply checks if nil, empty string or just whitespace. Interpolating nil just works, so "#{prod.named_size(item)}" becomes "". Only difference would be whitespace, but I guess that neither happens nor would prawn render it.

Fixed!

If you want to increase the Ruby to 11, you can also just size = prod.named_size(item) || "" to ensure it's always a string.

I did not do this for now as I have no idea about the implications of requiring Ruby 11 and if we do so already 😉