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

[Admin] Add request spec for Refund Reasons & other minor edits #5822

Merged

Conversation

MadelineCollier
Copy link
Contributor

  • Remove unused load_refund_reason from controller
  • Ensure copy is consistent for admin refund reasons
  • Fix attribute reference
  • Add request spec for new admin refund reasons

Summary

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

The general consensus is that this pattern persists across the new admin
controllers purely by virtue of a copy/paste carry-over as it looks like
it's not being used anywhere.
The copy had a few inconsistencies and copy/paste errors.
The human-readable output is the same regardless of which model we are
referencing here, (always "Active") but since this is the
RefundReason component, let's be consistent and reference that here.
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.84%. Comparing base (7d2d97a) to head (cb33038).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5822      +/-   ##
==========================================
+ Coverage   88.79%   88.84%   +0.05%     
==========================================
  Files         737      737              
  Lines       17227    17224       -3     
==========================================
+ Hits        15296    15302       +6     
+ Misses       1931     1922       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MadelineCollier
Copy link
Contributor Author

Requesting review from @rainerdema and @elia just to be sure that the removal of load_refund_reason looks okay to you guys (since Elia suggested the removal, and Rainer you introduced the method).

Hope the review request is not too spammy for you guys, thanks in advance! :)

@rainerdema
Copy link
Contributor

rainerdema commented Aug 13, 2024

Requesting review from @rainerdema and @elia just to be sure that the removal of load_refund_reason looks okay to you guys (since Elia suggested the removal, and Rainer you introduced the method).

Hey @MadelineCollier, I’ve investigated this a bit and I believe that most of these load_[resource_name] are due to copy-pasting from the first simple controller created that we all used as an example 😅

Considering that most of the controllers don’t even have a show action and that these aren't tied to any before_action, I believe it is safe to remove them.

I have identified the following controllers that have load_[resource_name] that seem unused:

Hope the review request is not too spammy for you guys, thanks in advance! :)

Not at all! 🙏 I’m really glad to see the work on the admin is progressing.

@MadelineCollier
Copy link
Contributor Author

Requesting review from @rainerdema and @elia just to be sure that the removal of load_refund_reason looks okay to you guys (since Elia suggested the removal, and Rainer you introduced the method).

Hey @MadelineCollier, I’ve investigated this a bit and I believe that most of these load_[resource_name] are due to copy-pasting from the first simple controller created that we all used as an example 😅

Considering that most of the controllers don’t even have a show action and that these aren't tied to any before_action, I believe it is safe to remove them.

I have identified the following controllers that have load_[resource_name] that seem unused:

Hope the review request is not too spammy for you guys, thanks in advance! :)

Not at all! 🙏 I’m really glad to see the work on the admin is progressing.

Perfect! I'll look at removing those all today :) Thanks for the review!

@MadelineCollier MadelineCollier merged commit 8308687 into solidusio:main Aug 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants