Skip to content

Conversation

@wwahammy
Copy link
Member

@wwahammy wwahammy commented Jun 26, 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.

When working on #1188, I realized we don't use NonprofitsController#create. At all. Instead we create Nonprofits through the Api::NonprofitsController#create method. There's no reason to keep this other method around. In fact, we shouldn't.

I also realized there are some other methods that were only used by that method so I deleted those too.

Comment on lines -204 to -210
# Register (create) a nonprofit with an initial admin
def self.register(user, params)
np = create ConstructNonprofit.construct(user, params)
Role.create(user: user, name: "nonprofit_admin", host: np) if np.valid?
np
end
Copy link
Member Author

Choose a reason for hiding this comment

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

Only used by NonprofitsController#create

@@ -1,12 +0,0 @@
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
Copy link
Member Author

Choose a reason for hiding this comment

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

Only used by Nonprofit.register

require "get_data"
require "stripe"

module CreateStripeAccount
Copy link
Member Author

Choose a reason for hiding this comment

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

Only used by ConstructNonprofit.construct

@wwahammy wwahammy enabled auto-merge June 27, 2025 21:52
Copy link

@djohnston32 djohnston32 left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

@wwahammy wwahammy merged commit 3f0c792 into supporter_level_goal Jun 27, 2025
8 checks passed
@wwahammy wwahammy deleted the remove-unused-nonprofits_controller#create branch June 27, 2025 23:01
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