# Saving data of some other model

**URL:** <https://www.ruby-forum.com/t/saving-data-of-some-other-model/145222>\
**Category:** Rails\
**Created:** [August 6, 2008, 10:19pm UTC](https://www.ruby-forum.com/t/saving-data-of-some-other-model/145222 "2008-08-06T22:19:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [August 6, 2008, 10:19pm UTC](https://www.ruby-forum.com/t/saving-data-of-some-other-model/145222/1 "2008-08-06T22:19:00Z")

</div>

I have two models.  
Books  
Authos

books… has\_many :authors

now you can add author through authors controller after selecting a  
book.

but I also want to be able to add author through book’s new/edit form.  
like there is a field in which I can provide authors names so that those  
would be stored in authors table with this book\_id.

I am not really sure how to do this while I am using book controller.
