我在rails3.1一个问题,在轨控制台查询在rails3.1
a=User.find_by_name 'castiel'
a.name #output: castiel
a=User.where "name like 'c%'"
a.name #output: User
#both query got the same thing,but why the second one output 'User'
我rails3.1这是关于认证使用的新功能,你知道,在railscast推出了一个插曲authentication-in-rails3.1,也许这与此有关,只是认为让你了解这里的情况可能是件好事。
啊!谢谢你,我犯了一个多么愚蠢的错误 – castiel