Question was how to add a book and make page not go to error page when user does not select category. The answer was to got to the books_controller.rb file and type the following:
Below class BooksController < ApplicationController
before_action :authenticate_user!, except: [:index, :show]
Question was how to add a book and make page not go to error page when user does not select category. The answer was to got to the books_controller.rb file and type the following:
Below class BooksController < ApplicationController before_action :authenticate_user!, except: [:index, :show]
and
Thanks Cam