【发布时间】:2014-08-28 08:48:53
【问题描述】:
我有这个模型
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
如何定义interesses 的单数是interesse?而不是interess
【问题讨论】:
标签: ruby-on-rails ruby model plural