# Acts\_as\_taggable with only 1 taggings table

**URL:** <https://www.ruby-forum.com/t/acts-as-taggable-with-only-1-taggings-table/57373>\
**Category:** Rails\
**Created:** [April 10, 2006, 2:04pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-with-only-1-taggings-table/57373 "2006-04-10T14:04:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@andreas](https://www.ruby-forum.com/u/andreas)\
**Post date:** [April 10, 2006, 2:04pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-with-only-1-taggings-table/57373/1 "2006-04-10T14:04:18Z")

</div>

I was reading rails recipes and it shows how to use acts\_as\_taggable  
with only 2 tables, a tags and a taggings table.  
But I think that its related to an older acts\_as\_taggable version  
because now it seems that it works with one tags table and one taggings  
table for each tagable model, like this:

tags  
photos  
tags\_photos

Which means I need one new table for each model I want to tag.

Isn’t there a way to use only 1 table with the taggings, to have a  
centralized table for all kinds of items I want to tag?

I read the documentation and I think its possible using the  
join\_class\_name option, but I didn’t manage to work it out. Can anyone  
please explain how its done, and please don’t forget how the table  
structure works.

Thanks

---

<div class="post-metadata">

**Author:** ![andreas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@andreas](https://www.ruby-forum.com/u/andreas)\
**Post date:** [April 10, 2006, 5:13pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-with-only-1-taggings-table/57373/2 "2006-04-10T17:13:35Z")

</div>

There are two acts\_as\_taggle plugins, the original gem  
and the newer plugin.

The gem uses a tags table and a HABTM table between a  
tags table and the table that you want to be taggable.

The newer plugin uses a two table design and is based  
upon some post 1.0 features.

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![andreas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@andreas](https://www.ruby-forum.com/u/andreas)\
**Post date:** [April 10, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-with-only-1-taggings-table/57373/3 "2006-04-10T18:21:54Z")

</div>

Tom M. wrote:

> There are two acts\_as\_taggle plugins, the original gem  
> and the newer plugin.
> 
> The gem uses a tags table and a HABTM table between a  
> tags table and the table that you want to be taggable.
> 
> The newer plugin uses a two table design and is based  
> upon some post 1.0 features.
> 
> –  
> – Tom M.

Thanks a lot, thats correct, here’s a link in case anyone else is stuck  
on that: [http://www.notio.com/2006/02/rails\_acts\_as\_t.html](http://www.notio.com/2006/02/rails_acts_as_t.html)
