Notes to self


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 next version more intensively.  Speaking of which… here is what’s coming in 1.1.0 release.

InvoicePrinter 1.0

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?

Sending JSON API like 401 Unauthorized error with Devise

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.

Pre/post deploy hooks with Dokku 0.5.0

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.

by Josef Strzibny