Some time ago we decided to make our acceptance tests faster. We were using Cucumber with Selenium and we replaced it with the Poltergeist driver. Poltergeist uses the PhantomJS engine and thanks to that our tests run around three times faster then they did before. Everything works smoothly on our machines, but there is one small… Read all »

Some time ago I started experimenting with PostgreSQL features to allow creating foreign keys for ActiveRecord polymorphic relations. Since PostgreSQL is a pretty powerful tool, I ended up creating a pg_morph gem which made it much easier to achieve. How it works I already described in my previous post, but if you don’t want to go… Read all »

We probably all agree that "Thin controller, fat model" was a misconception. When "thin controller" sounds good, "fat model" is just a pain in the...let’s say - lower back ;) Last week Ania Ślimak was talking about putting model on a diet. She presented a nice approach of reducing fat from models using validation factory… Read all »

Have you ever wondered how many colors a picture actually has? How many colors do you think are on the following image? Many people would say 2, but actually there are 1942. It's because of the fact that in order to make an image with smooth borders not all of the pixels are pure black… Read all »

Regardless of what I work on - frontend or backend - the most important thing for me is to be sure that everything is working properly after my changes. That's why, in my opinion, tests are essential. In order to not have to remember about executing tests on every change, I use guard gem, which does it… Read all »