Loan logic in a library

Asked

Viewed 57 times

0

I’m looking to do a logic of a library book loan,

I made a scaffold for book one for user and another for loan.

In the list of books in each book has a loaner button when I click it takes the id and the name of the book for the loans, in loan will keep the id the name of the book and I will set a user for that loan.

The problem that I find and make that when I lend a book it is unavailable to be borrowed and to make the return of this book

NOTE: I’ve only been working with Ruby for two months in an internship, I’ve never used the language before.

  • you managed to resolve this issue?

  • 1

    Yes!!!!! got, put in the books an attribute situation string type and each time I click the lend button give an update on the situation of the book for use and it will not appear in the table while it is in use and when it is returned will do another update on the situation for available

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.