Hi Scott This is a known bug - TS/Rails 3 generation of joins doesn't take has-many :through's into account.
Assuming the usual tag structure, try the following instead: has taggings.tag(:id), :as => :tag_ids Essentially, you can't use has-many :through's as shortcuts - you need to go the long way around. I do need to fix this, but ARel is a tricky beast to master. Cheers -- Pat On 01/02/2011, at 6:17 PM, Scott Lenney wrote: > Simple problem, after updating to rails 3 I get the following problem > > Looking at the example on attributes: > http://freelancing-god.github.com/ts/en/indexing.html > > I want to index the id as an attribute > has tags(:id), :as => :tag_ids > > That all works fine, but when I update a record I now get an undefined > method 'tags', if I remove the above line no problem. This started > after updating to rails 3. > > If anyone has any ideas or if already addressed please let me know > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
