# Find or create RESTfully

**URL:** <https://www.ruby-forum.com/t/find-or-create-restfully/119797>\
**Category:** Rails\
**Created:** [November 10, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/find-or-create-restfully/119797 "2007-11-10T17:29:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pallan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/71c47a/32.png) [@pallan](https://www.ruby-forum.com/u/pallan)\
**Post date:** [November 10, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/find-or-create-restfully/119797/1 "2007-11-10T17:29:57Z")

</div>

Hi all,

I am building a system and trying to do it RESTfully using the new and  
improved Rails 2.0RC1 and I am not sure how to structure a find or  
create action. Basically, I want a user to be able to add a line item  
to a list based on vendor. The user has to select the vendor and enter  
the product information. When they submit the system will find a list  
already exists for that vendor or create a new one, and then adds the  
new item to it.

My question is in a RESTful architecture where do I do this? Do I  
forward to a create action in case a list does not exist or do I forward  
to an update action in case one does?

Thanks

Peer
