switch_user gem发布 ... no reply
by Latest from ChinaonRails
at 2010-11-11 11:06:42
original http://feedproxy.google.com/~r/LatestFromChinaonrails/~3/UzURx7kBSic/4606.html
switch_user主要是用来方便地切换当前用户,这样你就不需要再为了检查一个页面在不同用户(匿名用户,只读用户,可写用户,管理员)访问的情况,而重复的注销,输入用户名、密码,登录,再注销,再登录了。
也可以用来帮助管理员作为某个用户登录,以此重现这个用户特定出现的错误。
项目地址:https://github.com/flyerhzm/switch_user
Demo:http://switch-user-example.heroku.com/
![]()
