NameError: uninitialized constant (rails)

后端 未结 10 773
一向
一向 2020-12-24 05:52

I have a simple model called PhoneNumber:

class PhoneNumber < ActiveRecord::Base
  validates :pnumber, presence: true, on: :create #=> { :message =>         


        
10条回答
  •  伪装坚强ぢ
    2020-12-24 06:04

    I had a similar error, but it was because I had created a has_one relationship and subsequently deleted the model that it had_one of. I just forgot to delete the has_one relationship from the remaining model.

提交回复
热议问题