DangerousAttributeError in OmniAuth Railscast Tutorial: create is defined by ActiveRecord

后端 未结 4 754
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条回答
  •  -上瘾入骨i
    2021-01-18 02:10

    Activerecord is warning you that some of your database attribute names (create etc.) clash with the names of instance methods provided by activerecord/ruby.

    Since rails would otherwise create instance methods of those names to access attributes, such a clash used to cause really weird things to happen. Thus active record raises an exception to warn you that this is happening

提交回复
热议问题