# Store objects with a custom attribute

**URL:** <https://www.ruby-forum.com/t/store-objects-with-a-custom-attribute/181461>\
**Category:** Rails\
**Created:** [January 12, 2010, 11:32am UTC](https://www.ruby-forum.com/t/store-objects-with-a-custom-attribute/181461 "2010-01-12T11:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Post date:** [January 12, 2010, 11:32am UTC](https://www.ruby-forum.com/t/store-objects-with-a-custom-attribute/181461/1 "2010-01-12T11:32:37Z")

</div>

Hi,

i try to store objects which differ through a complicated  
relationship.  
So e.g. i want to store the moderators, the user … of another  
object.  
Currently i create an array for each relationship where i store the  
users with this particular relationship (@members\_users,  
@members\_moderators, …).  
I think thats not the best way, so can i add a custom attribute just  
for this case and not in the db to differ between the different  
relationships and that i can store all members in one array?  
Do you’ve got another idea to handle this situation?
