Dylan Pinn

Joined

15,810 Experience
151 Lessons Completed
1 Question Solved

Activity

Try adding `validates :authors, presence: true` to the Book model.
Hey your `create` action shouldn't need to loop over the `book_params` to create params.

I quickly created a sample app that shows how I use `cocoon` with many-to-many relationships.

It is at https://github.com/dylanpinn/rails-bookstore. Let me know how you go.
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.