Refinements is a Ruby 2.0 answer to monkey patches that can take control of your program without you realizing it. Next time you will be tempted to monkey patch something, think twice and consider using refinements.
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.
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 […]
After some time with 1.0.0.rc1 I am releasing a final 1.0.0 of InvoicePrinter. So what it is it, what does it mean and what’s next?
If you are using Ruby on Rails together with Devise gem you might be wondering how to handle unauthorized error responces in your JSON API.
Deploying with Dokku and in need to run some basic setup tasks such as copying config/database.yml.example to config/database.yml in Rails? It’s possible with Dokku 0.5.0 and app.json file.
This a very short note on setting up Capybara to correctly follow redirects with Rails classic redirect_to @object pattern.
letsencrypt.org 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 […]
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.
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.