的多个名字,我有这个模型Ruby on Rails的 - 定义模式或表
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
结束并让我与Interess。现在,它给了我这个错误:
uninitialized constant Oferta::Interess
我如何定义的单数interesses
是interesse
?而不是interess
请参阅http://stackoverflow.com/questions/1185035/how-do-i-override-rails-naming-conventions – 2014-08-28 08:52:59
有用的链接。谢谢! – Lokuzt 2014-08-28 08:58:06