Craig SheenCalculating age in RailsToday I had to calculate an age in Rails and I wanted to share the process and final outcome and see if anyone had a nicer way.Sep 6, 20174Sep 6, 20174
Craig SheenGotcha: Rails callback that checks changed fieldsRecently I saw a post that explained a gotcha around Rails with the use of callbacks when checking for changed fields. This gotcha does…Sep 5, 2017Sep 5, 2017
Craig Sheencount vs length in RailsWhat is the difference is between count and length in Rails and is there much difference? Knowing the differences could lead to improved…Feb 12, 20172Feb 12, 20172
Craig SheenUsing cron locks with Cloud66Devops isn’t my strong point so I use Cloud66 for freelance projects and we also use it at work. I run many rake tasks through the UI and…Jan 19, 2017Jan 19, 2017
Craig SheenRails migrations can do more than you think!Over the past year I have really started to realise the true power and differences in what you can do in a Rails migration and I wanted to…Sep 20, 2016Sep 20, 2016
Craig SheenUsing ‘.exists?’ in RailsRecently I was asked by a team member what was better to use `.exists?(…)` or `.where(…).present?`. At one point I did actually think…Aug 22, 2016Aug 22, 2016