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

return true when undo_loan is successful #1151

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

rendonluis
Copy link
Contributor

What it does

undo_loan returns true when loan is successfully destroyed.

Why it is important

Fixes bug where error message is displayed even if loan was successfully undone described here

UI Change Screenshot

Old:
image
New:
image

Your bandwidth for additional changes to this PR

  • I have the time and interest to make additional changes to this PR based on feedback.
  • I am interested in feedback but don't need to make the changes myself.
  • I don't have time or interest in making additional changes to this work.
  • Other or not sure (please describe):

Copy link
Member

@jim jim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, awesome! Thanks for making this change. I'm thinking it would be great to add a test to cover the "undo a non-consumable loan" case, which should be very similar to the one that you updated but with a different borrow_policy. We missed adding coverage for that case whenever this code was originally written.

The CI check for "standardrb" that's failing can likely be fixed using bundle exec standardrb --fix. I think it doesn't like the use of the return keyword when you can just use true on that line to indicate what value to return.

Copy link
Member

@jim jim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks for making those changes 😄

@jim jim merged commit a72a1c9 into chicago-tool-library:main Oct 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants