Skip to content

Commit 8fa1fb8

Browse files
committed
1069: Comment what needs to be removed once the flag is retired
1 parent df61688 commit 8fa1fb8

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/models/school.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class School < ApplicationRecord
4242

4343
before_save :format_uk_postal_code, if: :should_format_uk_postal_code?
4444

45+
# TODO: Remove the conditional once the feature flag is retired
4546
after_commit :generate_code!, on: :create, if: -> { FeatureFlags.immediate_school_onboarding? }
4647

4748
def self.find_for_user!(user)
@@ -64,6 +65,7 @@ def rejected?
6465
end
6566

6667
def verify!
68+
# TODO: Remove this line once the feature flag is retired
6769
generate_code! unless FeatureFlags.immediate_school_onboarding?
6870

6971
update!(verified_at: Time.zone.now)

app/services/school_verification_service.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def verify(token: nil)
1111
School.transaction do
1212
school.verify!
1313

14+
# TODO: Remove this line once the feature flag is retired
1415
SchoolOnboardingService.new(school).onboard(token: token) unless FeatureFlags.immediate_school_onboarding?
1516
end
1617
rescue StandardError => e

lib/concepts/school/operations/create.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def call(school_params:, creator_id:, token:)
1010
School.transaction do
1111
response[:school].save!
1212

13+
# TODO: Remove this conditional once the feature flag is retired
1314
SchoolOnboardingService.new(response[:school]).onboard(token:) if FeatureFlags.immediate_school_onboarding?
1415
end
1516

0 commit comments

Comments
 (0)