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

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to