hideModal(); <%courses = Course.where("tea_id = #{@user.id}") %> <% unless courses.empty? %> <% courses.each do |course|%> $("#course_<%=course.id %>").html("<%=escape_javascript(render :partial => 'courselist_detail_tr', :locals => {:course => course}) %>"); <% end %> <% end %> <% if @flag == 1 %> $("#course_<%=@course.id %>").html(""); <% end %>