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

Adds a delete button to the purchase show page, hooked to the existin… #1646

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

CraigJZ
Copy link
Collaborator

@CraigJZ CraigJZ commented Apr 26, 2020

…g destroy action in the Purchase controller. Restricts deletion of a purchase to organization and super admin.

Resolves #1640

Description

Adds a delete button to the Purchase show page to make use of the existing destroy action. Also uses the authorize_admin method to restrict use of the destroy action.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

New request and system specs where added to exercise the new code.
Full test suite was run and was green.
Rubocop -a was run with no violations
Feature was manually tested in the development environment.

Screenshots

Purchase show page, before:
purchase_show_before

Purchase show page, after:
purchase_show_after

…g destroy action in the Purchase controller. Restricts deletion of a purchase to organization and super admin.
@auto-comment
Copy link

auto-comment bot commented Apr 26, 2020


Thank you for your pull request!
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
Best,
@rubyforgood/diaper-team

@seanmarcia
Copy link
Member

Looks great, thanks!

@seanmarcia seanmarcia merged commit f9ba10a into master Apr 26, 2020
@seanmarcia seanmarcia deleted the 1640_allow_diaper_banks_to_delete_purchases branch July 21, 2020 01:18
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.

Allow Diaper Banks to Delete Purchases
2 participants