Skip to content

Conversation

@camckin10
Copy link

@camckin10 camckin10 commented May 29, 2025

NOTE: DO NOT discuss internal CommitChange information in your PR; this PR will be public.
Link back to the issue in the Tix repo when you need to do that.

Fixes Delete the reference between Nonprofit and Card

}
}

let(:nonprofit) { force_create(:nonprofit) }
Copy link
Author

Choose a reason for hiding this comment

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

I did not think I needed to remove the creation of the nonprofit and creation of nonprofit admin in this spec file?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand what you're asking.

@camckin10 camckin10 marked this pull request as ready for review May 29, 2025 17:51
@camckin10 camckin10 requested a review from wwahammy as a code owner May 29, 2025 17:51
@camckin10 camckin10 marked this pull request as draft May 30, 2025 19:36
@camckin10 camckin10 marked this pull request as ready for review June 4, 2025 17:06
@camckin10 camckin10 requested a review from caseyhelbling June 4, 2025 17:07
Copy link
Member

@wwahammy wwahammy left a comment

Choose a reason for hiding this comment

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

Please verify that nothing breaks when you run this code. It appears that it does if you login and go to settings for a nonprofit.

@camckin10 camckin10 removed the request for review from caseyhelbling June 9, 2025 22:21
@camckin10
Copy link
Author

Please verify that nothing breaks when you run this code. It appears that it does if you login and go to settings for a nonprofit.

@wwahammy Tested this locally, and all pages render properly, there are no errors.

@camckin10 camckin10 requested a review from wwahammy June 10, 2025 02:03
Comment on lines +18 to +19
<hr>
<label>Payment Method</label>
Copy link
Member

Choose a reason for hiding this comment

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

What is being labelled by the Payment Method label?

elsif holder_type == :supporter
holder = Supporter.select("id, email, nonprofit_id").includes(:cards, :nonprofit).find(card_data[:holder_id])
end
holder_type == :supporter
Copy link
Member

Choose a reason for hiding this comment

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

What affect does this line have on the behavior of the code?

# @type [Nonprofit] holder
card = holder.create_active_card(card_data)
elsif holder_type == :supporter
holder_type == :supporter
Copy link
Member

Choose a reason for hiding this comment

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

What affect does this line have on the behavior of the code?

scope :amex_only, -> { where("cards.name ILIKE ? OR cards.name ILIKE ?", "American Express%", "amex%") }
scope :not_amex, -> { where("cards.name NOT ILIKE ? AND cards.name NOT ILIKE ?", "American Express%", "amex%") }

scope :held_by_nonprofits, -> { where("cards.holder_type = ? ", "Nonprofit") }
Copy link
Member

Choose a reason for hiding this comment

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

We should keep this, just because we removed the references in the code doesn't mean we've removed all of the records for nonprofit cards. At some point, we'll need to clear those out and delete them.

Please note that we need to do that.

# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
require "rails_helper"
describe "nonprofits factory" do
describe :with_billing_subscription_on_stripe do
Copy link
Member

Choose a reason for hiding this comment

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

Why keep an empty spec? It's a headache to keep a spec file with nothing in it.

def failed_notice(np_id)
@nonprofit = Nonprofit.find(np_id)
@billing_subscription = @nonprofit.billing_subscription
@card = @nonprofit.active_card
Copy link
Member

Choose a reason for hiding this comment

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

So you've deleted this line but what is this mailer used for? What about the view associated with the mailer action, does this change break it? Or do we even need the mailer or view?

Copy link
Member

Choose a reason for hiding this comment

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

There are traits in this file which reference active_card. If we're removing the active_card attribute and other associated methods, those need to be addressed too.

}
}

let(:nonprofit) { force_create(:nonprofit) }
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand what you're asking.

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