Say if @news_writers is an array of records. I then want to use @news_writers to find all news items that are written by all the news writers contained in @news_writers.
So I want something like this (but this is syntactically incorrect):
@news = News.find_all_by_role_id(@news_writers.id)
Note that
class Role < ActiveRecord::Base
has_many :news
end
and
class News < ActiveRecord::Base
belongs_to :role
end