刘华佼的全栈学习记录

如何限制“必须要先登录才能新建讨论群”

| Comments

目标:

必须要先登录才能新建讨论群

步骤:app/controllers/groups_controller.rb中加入一句:

before_action :authenticate_user!, only:[:new]

Comments

comments powered by Disqus