“...I've been working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix and learning Rust. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working for InPay...”

Rob Lacey
Senior Software Engineer, UK

turning off ActiveRecord logging in the console

It’s sometimes quite annoying to have SQL queries clogging up the Rails console when you don’t need to see it. You Can turn it off by setting ActiveRecord’s logger to nil

old_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil

You can of course turn it back on again.

ActiveRecord::Base.logger = old_logger
GPK of the Day Evil EDDIE