app/controllers/admin/books_controller.rb
# Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through .
def admin_book_params
    params.require(:book).permit(
      :title,
      :publisher_id,
      :published_at,
      :isbn,
      :blurb,
      :page_count,
      :price,
      :cover_image,
      author_ids: []
    )
  end
def admin_book_params params . require ( :book ) . permit ( :title , :publisher_id , :published_at , :isbn , :blurb , :page_count , :price , :cover_image , author_ids : [ ] ) end
Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through .
# params.fetch(:book, {})