Extract conditionals into well-named methods
One of the simplest (and most effective) ways to refactor is to extract a method. The naming of an extracted method is a great tool for communicating the thinking behind the code.
Extract conditionals into well-named methods #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/extract-conditionals-into-well-named-methods