Я хочу создать модель «Белый список», чтобы создать список пользователей, которые я не хочу отображать в моей основной модели «Пользователь».
Пример контроллера
def index
@users = User.find(:all) #These are to be filtered behind the scenes in the model
end
Пример модели
class User ActiveRecord::Base
has_many :whitelist
def self.find
#Add something that will lookup items in the Whitelist model and filter those matches out of a find(:all) in the User model.
end
Надеюсь, это имеет смысл.Спасибо за помощь.