Hi there,
I'm trying to access sphinx_attributes in this setup:
class Brand < ActiveRecord::Base
has_many :brand_ids
has_many :brand_roles, :through => :brand_ids
end
ThinkingSphinx::Index.define :brand, :with => :active_record do
indexes name, :sortable => true
has
brand_roles.id, :as => :role_id, :type => :integer, :multi => true
end
brands = Brand.search(:conditions => {:name => params[:search]}, :order => :name, :page => params[:page], :per_page => 5)
brands.context[:panes] << ThinkingSphinx::Panes::AttributesPane
puts brands[0].sphinx_attributes['role_id']
undefined method `sphinx_attributes' for #<Brand:0x5c19e88>
What am I missing?
My versions:
Sphinx 2.1.3
thinking-sphinx 3.0.6
Rails 3.2.14