I want to search for example 10 random people of the same party I did the following, but this is selecting people from all parties, what can be done? = D
class Pessoa < ActiveRecord::Base
class << self
def filtra_pessoas()
Pessoa.where('rand()', partido: "sem partido").first(10)
end
end
end