So I have a table with books and a table with borrowers. A User borrows a book of choice, and later it is shown on the page who borrowed it and what was borrowed.
Now I also have a column in my books table which is count, to see how many times the book has been borrowed.
Should the code for it go into borrowing controller? I tried to put it under def create action before.
Did something like count = Book.find(params[:id]), count = params[:count] + 1
But this solution seemed to not work, it did't even find the book that I was talking about.