Archive

Archive for the ‘ruby’ Category

jQuery.load is a POST in IE but a GET in Firefox

September 9th, 2009 Patrick No comments

With a major thanks to JustinBall.com, I have finally figured out a major issue with a production app. That’ll teach me to not test in IE on PC.
Read more…

jQuery.load is a POST in IE but a GET in Firefox

Dashed Lines In Prawn

December 26th, 2008 Patrick No comments

For a recent project, I’ve been using Prawn, a pretty robust PDF generation utility for Ruby. Generating PDFs is never fun, but Prawn (with the help of Ruby) makes it pretty easy.

One thing lacking in the Prawn library is the ability to make dashed lines. However, the logic of actually creating the dashed line isn’t that complex. You simply draw a solid line, but “pick up” the stroke every few pixels and allow some whitespace. Below is my code for creating multiple dashed lines on a page. It’s pretty simple to see how I’m creating a 2 pixel dash and then skipping 5 pixels forward (leaving 3 pixels of white.)

You can see the output here: dashed_lines.pdf

Dashed Lines In Prawn
Categories: ruby Tags:

lowest common denominator is Digg proof thanks to caching by WP Super Cache