Railsware Blog

on product management, engineering, design, culture and many more...

ChainFlow – refactor your data processing

ChainFlow – refactor your data processing

TL; DR; This article describes how to refactor and improve readability of complex data processing with syntax similar to Haskell do-notation and State monad. Motivation Latest project I’ve been involved in deals with a lot of data processing.Typical case was a method that receives a data chunk and chains it …

API with Ruby on Rails

API with Ruby on Rails: useful tricks

This article is about gotchas you should be aware of while building your API with Ruby on Rails. Controller tricks: API on Metal Sooner or later each Rails developer come to a point when he wants to build his first API.Among the first things you have to take care of …

Rails 3.2.9 through associations issues

Recent 3.2.9 release bugfix has brought an issue for through associations.inverse_of usage can solve the problem only partially (polymorphic associations are still affected). UPDATE: patch that introduced this issue has just been reverted in rails master. Few days ago Rails 3.2.9 was released.Among the bugfixes a fix for through associations …

Rails 4.0 ActiveSupport small improvement

A few days ago my patch with the beginning_of_week config option has been merged to Rails master, so starting from Rails 4.0 we’ll gain full control over the week start day. Preface Working on Interstellar, I’ve found out thatActiveSupport has a lot of useful methods like Date#beginning_of_week, Date#end_of_week and many …

Mailtrap Feed Me Campaign

The Mailtrap Feed Me campaign has started – share your fail story and win an iPad or other prizes! Have you ever used your production database in staging or development environments just to fix some tricky bug and make sure everything works as expected.Hell yeah, we all do this right?But …