# Dynamic Meta data

**URL:** <https://www.ruby-forum.com/t/dynamic-meta-data/187679>\
**Category:** Rails\
**Created:** [April 27, 2010, 6:47pm UTC](https://www.ruby-forum.com/t/dynamic-meta-data/187679 "2010-04-27T18:47:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [April 27, 2010, 6:47pm UTC](https://www.ruby-forum.com/t/dynamic-meta-data/187679/1 "2010-04-27T18:47:37Z")

</div>

What is the best way to have a table that defines what the thing is  
and another table that defines if you hae it or not… maybe a table  
will describe what i want better!! :

```
       ----------------define the items in one table
      V

```

[X] ITEM1  
[_] ITEM2  
[_] ITEM3  
[X] ITEM4  
…  
[\_] ITEMX

^------------------------Define if the user has it in another

Is this polymorphic? please point me where to learn how to do this  
the right way…

---

<div class="post-metadata">

**Author:** ![spokra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@spokra](https://www.ruby-forum.com/u/spokra)\
**Post date:** [April 27, 2010, 8:31pm UTC](https://www.ruby-forum.com/t/dynamic-meta-data/187679/2 "2010-04-27T20:31:18Z")

</div>

This is a simple many-to-many relationship.

See here:

> **[ActiveRecord::Associations::ClassMethods](https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html)**
>
> Associations are a set of macro-like class methods for tying objects together through foreign keys.
