1

私はこのモデルを持っています

class Oferta < ActiveRecord::Base
  belongs_to :entidade
  has_many :candidatos, :through => :interesses
  has_many :interesses, foreign_key: "oferta_id", dependent: :destroy

基本的に私はこのモデルとモデルInteresseとその複数形を持ってinteressesいますが、Rails は実際には最後に離陸し、 esInteress を残していると思います。そして今、このエラーが表示されます:

uninitialized constant Oferta::Interess

interesses単数形が であることをどのように定義できますinteresseか? そしてそうではないinteress

4

1 に答える 1