How to keep hash keys untouched by ActiveModel::Serializer

At work we use ActiveModel::Serializer to serialize ActiveRecord objects into JSON:API-like responses for our APIs. The problem is that ActiveModel::Serializer is clever enough to dasherize our hash keys (so they can be accessed as properties instead of [] brackets syntax) and our hash keys are actually real keys that we have to serve untouched.

InvoicePrinter 1.1.0 will bring A4 page size support, command line client and more

Not so long ago I announced first stable release of InvoicePrinter. I wanted to say that the API is stable and people to experiment with it. I am happy¬† to see that the project got already over 3 hundred stars and 20 forks. Wow, thanks! This kind of support motivates me to work on the […]

Trusted SSL certificates with Let’s Encrypt and NGINX is the new awesomeness that happened to SSL on the web. Forget over-priced trusted certificates or self-signed certs for your side & pro bono projects. Try trusted SSL in seconds for free instead :). If you choose to use Let’s Encrypt I want to show you what needs to be done on a pretty […]

Building international invoices with InvoicePrinter 0.0.9

From the start I wanted an unobstructive and flexible API for InvoicePrinter. This flexibility enables anyone to make international duo-lingual invoices without any special i18n API provided. But the truth is I had something a bit better in mind from the beginning and in 0.0.9 I am including something new suited for the job.

Running wkhtmltopdf in Vagrant (without X server)

Chances are you might need to run wkhtmltopdf on your server or in Vagrant environment (e.g. to overcome compatibility issue such as Cannot mix incompatible Qt library (version 0x50700) with this library (version 0x50701)). That way you need to be able to run it without an actual X server.