Rspec, CanCan and Devise

后端 未结 1 1597
我寻月下人不归
我寻月下人不归 2021-02-06 13:33

I am starting a project and i would like to be able to test everything :)

And i have some problems with CanCan and devise.

For exemple, I have a controller Conta

相关标签:
1条回答
  • 2021-02-06 13:56

    CanCan does not call Contact.new(params[:contact]). Instead it calls contact.attributes = params[:contact] later after it has applied some initial attributes based on the current ability permissions.

    See Issue #176 for details on this and an alternative solution. I plan to get this fixed in CanCan version 1.5 if not sooner.

    0 讨论(0)
提交回复
热议问题