RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: aghyad
After creating a new migration, I always run:
$ rake db:migrate db:test:clone
which propagates any migrations to both development and test environments equally
Very nice. I have to mention that PDFKit is also used to generate pdf files from html strings as follows:
html = "< h1>pla pla pla< /h1>"
kit = PDFKit.new(html, :page_size => 'Letter')
pdf = kit.to_pdf
file = kit.to_file("path/to/pdf/with/pdf_name.pdf")
Note: this might throw an error of missing wkhtmltopdf even when you unstall wkhtmltopdf, and I found out that you still need to install ghostscript to you computer (mine is Mac 10.7.4).