signed_in? function not working in Chapter 8-9 of Rails Tutorial (Hartl)

淺唱寂寞╮ 提交于 2019-12-02 11:23:33
Peter Alfvin

Update: The original version of this answer focused on Listing 9.1, which turned out to have been correct as is and has since been reverted to its current state with no sign_in user due to other problems the removal caused. However, the issue with Listing 9.9 noted in the OP's summary comment was a bona fide problem and the fix to add sign_in user to that listing remains.

This does appear to have been a bug in the Rails 4 tutorial, which dropped the sign_in(user) line from the before block in listing 9.9 that was present in the previous version. It has since been corrected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!