1 post

November 25, 2016

Enum vs. Active Record any?

Today at work I saw a really weird exception in prod. The code is in a Rails project using ActiveRecord and was something like this: And the dreaded exception that makes every rubyist want to cry: If there are any? of my things how can the first one be nil? When I saw this I had to remind myself of the best debugging advice I ever got: There has to be a reason. Computers are just machines, they just follow instructions. If the code after if was executed, the condition before it had to be true. […2 min read]

post#databases#rails#ruby#web-development