Heroku Deploy Script

This time I wanna share with you something rather small, but really helpful: my default Heroku deploy script. It will push new code to your Heroku application and run migrations, if necessary.

Continue reading…

Rails Interactor Pattern - Part 2

In part 1 of this series we've looked on the basics of the interactor pattern, created an interactor dealing with the Mailgun API and refactored it to use a Result class to signalize success and failure.
In this part, we want to add some method sugar to our solution, so that we don't have to deal with the setup process too much.

Continue reading…

Rails Interactor Pattern - Part 1

The other day I was working on a Rails application that did some communication with the Mailgun API. I already started with a light version of the interactor pattern but soon discovered that I wanted to have not only the hard work of
calling the API done in my interactor pattern, but also make the decision if the call was successful or not.

Continue reading…

Handmade Rails Presenters

The presenter pattern is one possible way to move logic from your views into a place where it's not only better suited, but can also be reused. Maybe that's the reason it's an essential part of the MVP pattern in other web frameworks. In this article, I want to offer a lightweight implementation that both explains some specialties when used with Rails helpers and doesn't need any external dependencies.

Continue reading…