1
내 레일 응용 프로그램 내 로컬 테스트 서버에서 잘 실행,하지만 난 내 생산 (여객) 서버를 배포 할 때, 나는 다음과 같은 오류 얻을 :Phusion 여객 오류 '알 수없는 키 (들)을 통해'
Error message:
Unknown key(s): through
Exception class:
ArgumentError
을
왜 이런 일이 일어날 수 있습니까? 개발 서버에서 모든 것이 잘 작동하기 때문에 코드에 본질적으로 결함이있는 것은 아닙니다. 코드의 잘못된 부분은 매우 간단하다 :
class PageEvent < Event
belongs_to :page, :through => :calendar
end
곳
class Event < ActiveRecord::Base
belongs_to :calendar, :polymorphic => true
end
및
class Calendar < ActiveRecord::Base
has_many :events, :dependent => :destroy, :inverse_of => :calendar, :as => :calendar, :class_name => "SpecialEvent"
end
그래 ... 코드는 문제없이 작동합니다. 왜 개발 과정에서 계속 작동했는지 궁금합니다. –