Joining and array with a table in ActiveRecord

Hey

I am pretty new to Ruby on Rails and I have no idea how to solve the
following:

I have a join query on a table like this:

def mytags
Taggable.joins(“JOIN taggables as filter ON taggables.tag_id =
filter.tag_id WHERE filter.taggable_type = ‘User’ AND filter.taggable_id
= 1”).all
end

this works perfectly fine.
then I want to join the result on another table, where
OtherTable.joins(@mytags) works also fine BUT I want to
join on two other colums and NOT on the ids…

Can anyone tell me how to do this?
thx

On Sat, Sep 17, 2011 at 4:31 PM, Isti B. [email protected]
wrote:

= 1").all


  •    ɡ
    

[email protected] [email protected]
*
*