Hi Scott

Sorry, I'm not sure what's going on .. is cdvds an association? It will need to 
be, if you're going to use it in your define_index block. Can you share your 
define_index block and the associations in this model?

Cheers

-- 
Pat

On 03/02/2011, at 5:30 AM, Scott Lenney wrote:

> Hi Pat,
> Thanks for the reply. 
> There isn't an association in this case. I am actually using dvds.
> 
> define_index do
>    indexes title, :sortable => true
>    has cdvds(:id), :as => :cdvdid
> end
> In pre-rails 3 this works fine, but in rails 3 TS works fine, but when I 
> update any record in cdvd (nothing to do with TS) I get the no method error 
> for cdvds. Does TS automatically include the id for the records? Meaning I 
> wouldn't need to include it in the indexing.
> 
> Thanks,
> Scott
> 
> 
> On Tue, Feb 1, 2011 at 12:37 AM, Pat Allan <[email protected]> wrote:
> 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.
> 
> 
> 
> -- 
> 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.

Reply via email to