Where is user.admin? defined in rails-devise-pundit starter app?

后端 未结 2 1508
梦如初夏
梦如初夏 2021-01-20 06:02

I used RailsApps rails-composer to create a rails-devise-pundit starter application. I am still a little new to ruby on rails and newer to devise, pundit and rails 4.

<
2条回答
  •  广开言路
    2021-01-20 06:30

    It is an attribute of the User model. Same as first_name or last_name, there is a field called admin which is a boolean.

提交回复
热议问题