@quakewang 这个问题现在已经解决了,但是@users.count还是会返回 11,有待解决。
@sco_array.inject({}) do |hash, score|
hash[score.student_id] = score.score if score.subject_title == '英语'
hash
end
Make sure your existing locales do not have admin: key under :en, :es, :de etc. You will get translation missing warning then.
使用 validates :password, :confirmation => true