# 2 forms + one to one relationship

**URL:** <https://www.ruby-forum.com/t/2-forms-one-to-one-relationship/160272>\
**Category:** Rails\
**Created:** [February 13, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/2-forms-one-to-one-relationship/160272 "2009-02-13T16:11:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![petan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@petan](https://www.ruby-forum.com/u/petan)\
**Post date:** [February 13, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/2-forms-one-to-one-relationship/160272/1 "2009-02-13T16:11:45Z")

</div>

Hi,

I have 2 controllers (posts and images) and one to one relationship. In  
my post/new.rhmtl I have two forms.

One is for uploading image, the image form submit button initialize  
lightbox to crop the image.  
The second form is for post. How can I assign image I have uploaded to  
the article I am just writting.

Thank you very much for your ideas.  
P.
