我有这个模型
class Oferta < ActiveRecord::Base
belongs_to :entidade
has_many :candidatos, :through => :interesses
has_many :interesses, foreign_key: "oferta_id", dependent: :destroy
基本上我有这个模型和模型Interesse
以及它的复数形式,interesses
但我认为 Rails 实际上在最后起飞 es
并留给我兴趣。现在它给了我这个错误:
uninitialized constant Oferta::Interess
我如何定义单数 tointeresses
是interesse
?并不是interess