Hi all

I'm battling a little with Rails 3 - trying to get Thinking Sphinx working with 
it. What I need is some way to interrogate ARel joins to find out table 
aliases, given a certain association hierarchy.

For example - a forum has a creator (User model), and many topics. Each topic 
has a creator as well. So, this is a valid query:

  Forum.joins(:creator).joins(:topics => :creator)

The resulting SQL has two references to the users table - how can I interrogate 
the relation object to find out the users table alias for the :topics => 
:creator association path?

A far more detailed analysis of what I want can be found as a gist: 
http://gist.github.com/441625

Any suggestions very much welcome.

Cheers

-- 
Pat
e: p...@freelancing-gods.com      || m: +614 1327 3337
w: http://freelancing-gods.com   || t: twitter.com/pat
bounce: http://trampolineday.com || skype: patallan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to