0
当我填充我的数据库时,获取未初始化的常量Chef :: Meal错误。未初始化的常量在导轨中
我在模型中做错了什么?
厨师型号
class Chef < ActiveRecord::Base
has_many :meals
end
膳食模式
class Meals < ActiveRecord::Base
belongs_to :chef
validates :chef_id, presence: true
end
谢谢,我已upvoted你的问题:) – jimagic