「高清顯示你會如何重構這個
@dept = Dept.find(params[:id])
@members = @dept.members_list.collect{|a|a.name}
dif = @dept.users.collect{|a|[a.name,a.id]}
@admin_list = @dept.admin_users.collect{|a|a.user}
@not_member_users = User.all_users - dif
@not_admin_user = (@dept.list_of_deptmembers - @dept.admin_users).collect{|a|[a.user.name, a.id]}'
我如何重構@not_admin_user?
你需要什麼做不同?也許提供一些背景或動機。 – 2013-02-28 02:03:31