Guard clauses are a valuable tool for keeping your methods easy to understand. The idea is simple: return early from a method to:

# Before
def update_published_date
  if published_date.present?
    published_date = Time.zone.now
  end
end

# After
def update_published_date
  return if published_date.nil?

  published_date = Time.zone.now
end