У меня есть Artwork
модель, которая связана с моделями Subject
, Location
, Keyword
, Style
и Medium
по HABTM. У меня также есть связь с моделью Artist
с одним-ко-многим. Вот моя ошибка, я получаю:мышление Sphinx - неопределенный метод `Klass'
>rake ts:index
Generating configuration to /Users/<user>/Developer/jtodd/jtoddgalleries/config/development.sphinx.conf
rake aborted!
NoMethodError: undefined method `klass' for nil:NilClass
Вот файл моих показателей:
ThinkingSphinx::Index.define :artwork, :with => :active_record do
indexes title, :sortable => true
has jtg
has width
has height
has subject.id, :as => :subject_ids
has location.id, :as => :location_ids
has keyword.id, :as => :keyword_ids
has artist.first_name, :as => :artist_first
has artist.last_name, :as => :artist_last
has style.id, :as => :style_ids
has medium.id, :as => :medium_ids
end
Я не могу понять, почему я получаю различные ошибки. У меня может не быть уверенности в полях против атрибутов, и, возможно, именно там я ошибаюсь. Любая помощь очень ценится, спасибо!
понял это, но это была именно проблема, спасибо за подтверждение! – inthenameofmusik