I am not able to update the association’s object attributes along with
my model object.
For example, my models are,
I am getting the attribute values for both the models from the view and
I try to update both in a single transaction. When I tried like,
@book.attributes = params[:book]
@book.library.attributes = params[:library]
It is updating the books table but not the libraries table.
But when I try the same logic for new book and new library creation, it
works fine. The problem is only when updating.
Now i have implemented as,
But I want to update both the attributes in a single statement and in a
Thanks in advance…