I have 3 models: products, tags and products\_tags:

Tag model:

```
class Tag < ActiveRecord::Base
        has_many :products, :through => :products_tags
        has_many :products_tags
end

```

Product Model:

```
class Product < ActiveRecord::Base
  has_many :tags, :through => :products_tags
  has_many :products_tags
  accepts_nested_attributes_for :tags
  accepts_nested_attributes_for :products_tags

```

Join: 

```
class ProductsTag < ActiveRecord::Base
  belongs_to :product
  belongs_to :tag
end

```

I need a query which will retrieve the attributes related to the tag and the product model, as an AREL object. 

So for example: 

My tag table has 1 field: Cat\_name 
My product table has: Title, URL, Image\_url.

How can I retrieve all these attributes as an AREL record.