Displaying 1 result from an estimated 1 matches for "view_school".
2006 Mar 27
1
Best way about doing this?
....Would do this in the
controller or the rhtml file itself? If in the controller, how? It''s
probably a stupid question, but I can''t see it. Can you do a loop
through each of the classrooms and assign them an array of teachers?
here is the controller for the form so far:
def view_school
@school = School.find(params[:id])
@classrooms = Classroom.find(:all,
:conditions => ["school_id = ?", params[:id])
end
--
Posted via http://www.ruby-forum.com/.