# Proper way to manage a collection of existing objects

**URL:** <https://www.ruby-forum.com/t/proper-way-to-manage-a-collection-of-existing-objects/156373>\
**Category:** Rails\
**Created:** [December 26, 2008, 4:01am UTC](https://www.ruby-forum.com/t/proper-way-to-manage-a-collection-of-existing-objects/156373 "2008-12-26T04:01:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcampbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Post date:** [December 26, 2008, 4:01am UTC](https://www.ruby-forum.com/t/proper-way-to-manage-a-collection-of-existing-objects/156373/1 "2008-12-26T04:01:21Z")

</div>

Hello,

I’ve been looking for a pattern to implement managing a collection of  
exiting objects, and haven’t had much luck.

For example, if I have REST controllers for users, and for groups, what  
would be a good way to implements the assignment of users to groups,  
where the group was already selected? Would it be to add the  
functionality to the existing group controller? Create a new controller  
to manage the association of the two?

I’ve seen plenty of examples of writing RESTfull controllers for  
individual models, and examples handling the creation of new dependent  
models (blog posts with new comments), but I haven’t been able to find  
examples of more complicated interactions. Does anyone know of a good  
reference?

Thanks.

-Michael
