DangerousAttributeError in OmniAuth Railscast Tutorial: create is defined by ActiveRecord

后端 未结 4 778
Happy的楠姐
Happy的楠姐 2021-01-18 01:25

I\'ve looked at ActiveRecord::DangerousAttributeError and other similar threads on SO, but they don\'t address the same issue.

I\'m following the omniauth tutorial:

4条回答
  •  难免孤独
    2021-01-18 02:07

    Try: current_user.authentications.create!

    EDIT

    So basically your problem was that you had columns in your table named the same as methods of the Modal class.

    You can't have a column named create or destroy in your database.

    Most likely it was a typo on your model/controller generation.

提交回复
热议问题