Skip to content

Instantly share code, notes, and snippets.

@Kamilahsantos
Created May 26, 2019 22:25
Show Gist options
  • Save Kamilahsantos/7236ceaa441a6c9c44d1d5c51471831f to your computer and use it in GitHub Desktop.
Save Kamilahsantos/7236ceaa441a6c9c44d1d5c51471831f to your computer and use it in GitHub Desktop.
class Clientes
def self.clientes_para_inativar
Clientes.all.select do |cliente|
cliente.ultima_compra > 1.month.ago && cliente.ativo?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment