LoginSignup
1
2

単純なスペルミス

Posted at

スペルミスのエラーはスペルミスとは言われない

発生したエラーの原因が単純なスペルミスであったため、備忘録として

発生したエラー

NameError in Devise::RegistrationsController#create
Rails couldn't find a valid model for Family association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass.

familyモデルとの関連付けが見つからないという内容であり、これがdeviseのgemで作成したuserモデルとの関連付けであったため、deviseを使用する際の何か特別な関連付けがあるのかと思い、数時間悩んだ。

解決

has_manyのスペルがhas_menyになっていた、、、こんな単純なことに数時間が悔しい。

冷静にエラー文を読むと、関連付けに問題があると書いてあり、関連付けのコードを見直してみるべきであった。反省。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2