Skip to content

Conversation

@Luke-Oldenburg
Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg commented Jan 12, 2026

This allows us to get a more accurate count on referrals

@Luke-Oldenburg Luke-Oldenburg requested a review from a team January 12, 2026 18:58
@sampoder
Copy link
Member

making birthday encrypted strikes again smh

Co-authored-by: Gary Tou <gary@garytou.com>
@garyhtou
Copy link
Member

Once the other PR merges, there will be a conflict here. Fix that and then this will be good to merge!

@garyhtou
Copy link
Member

We'll need to backfill

@Luke-Oldenburg Luke-Oldenburg added this pull request to the merge queue Jan 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2026
@Luke-Oldenburg Luke-Oldenburg marked this pull request as draft January 14, 2026 02:12
@Luke-Oldenburg Luke-Oldenburg marked this pull request as ready for review January 23, 2026 23:56
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is structured different than the UpdateTeenagerColumnJob but I think it should still work.

include HasTasks

before_update { self.teenager = teenager? }
before_update { self.joined_as_teenager = joined_as_teenager? }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
before_update { self.joined_as_teenager = joined_as_teenager? }
before_update(if: :will_save_change_to_birthday?) { self.joined_as_teenager = joined_as_teenager? }

Double check my code, but this may be what you want.

Comment on lines +435 to +438
def joined_as_teenager?
age_on(created_at)&.<=(18)
end

Copy link
Contributor

Choose a reason for hiding this comment

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

This will end up clashing with the joined_as_teenager? defined by Rails pulling from the database. Should we call this something else so that we pull from the DB when possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gary and I discussed this and I think we're going to loop back to fix this as it also affects teenager?

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.

5 participants