I have a student array object which returns multiple attributes. I need to extract only specific attributes from this array. Here is the code that I have tried
@project.each do |p|
@students << Student.find_by_id(:id => p.receiver_id, :select => "first_name, last_name")
end
But it is showing Unknown keys :id. I need only the first name and the last name to be inserted in @students array. I am using rails 2.3 and ruby 1.8.7. Please help.