Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix returned attribute logic #18

Open
meg-gutshall opened this issue Feb 3, 2021 · 1 comment
Open

Fix returned attribute logic #18

meg-gutshall opened this issue Feb 3, 2021 · 1 comment
Labels
status: pending 🕥 In a waiting state type: architecture 🏛️ Changes to code architecture type: maintenance 🔧 Fixes to and refactoring codebase

Comments

@meg-gutshall
Copy link
Owner

Currently the Loan class contains a boolean attribute called returned, however, it's occurred to me that a loan isn't returned, a loaned item is.

To fix this we can either:

  1. Rename the returned attribute to active to indicate whether or not the loan is currently active, or
  2. Remove the returned attribute from the Loan class altogether and add it to the Item class.

I'm more partial to the first option because if we go with the second option, we'll have to refactor other code as well.

@meg-gutshall meg-gutshall added priority: medium status: pending 🕥 In a waiting state type: maintenance 🔧 Fixes to and refactoring codebase type: architecture 🏛️ Changes to code architecture labels Feb 3, 2021
@meg-gutshall
Copy link
Owner Author

Consider using ActiveRecord Enums for this refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending 🕥 In a waiting state type: architecture 🏛️ Changes to code architecture type: maintenance 🔧 Fixes to and refactoring codebase
Projects
Status: To do
Development

No branches or pull requests

1 participant