Greg Ma wrote:
> Hi,
> I did a the method below that return all students who has the method
> parameter in their tags collection.
> I am sure this is pretty by coded, could someone help clean it up please
> :)
> 

I correct myself, but there is still probably something cleaner possible

#method
   def find_student_by_tag(tag)
     students = Student.find(:all)

     students.each do |student|
       students.delete(student) unless
 students.tags.find_by_name(tag)
     end
     students
   end
> 
> Greg

-- 
Posted via http://www.ruby-forum.com/.