0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

uninitialized constant User::FILL_INにハマった時に

Posted at

Railsチュートリアル第2章
リスト2.17

user.rb
class User < ApplicationRecord
  has_many :microposts
  validates FILL_IN, presence: true    # 「FILL_IN」をコードに置き換えてください
  validates FILL_IN, presence: true    # 「FILL_IN」をコードに置き換えてください
end

当初愚かにも「FILL_IN」の部分も書き換えずに書いていた
それで出たエラーがこれである
スクリーンショット 2021-05-26 22.13.13.png

user.rb
class User < ApplicationRecord
  has_many :microposts
  validates :name, presence: true
  validates :email, presence: true
end

コード中に使われているシンボルを思い出し、書き直した
しかし、エラ〜は出たままなのだ
それはリロードをして確認していたからなのでした😓

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?