Skip to content

Commit

Permalink
Give long line a better name
Browse files Browse the repository at this point in the history
  • Loading branch information
kronn committed Dec 11, 2024
1 parent d6889b8 commit 2f215ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/jobs/alumni_mail_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(group_id, person_id)
end

def perform
return if person.roles.without_alumnus.roles_in_layer(person.id, group.layer_group_id).any?
return if no_more_active_roles?

if group.is_a?(Group::Flock)
AlumniMailer.new_member_flock(person).deliver_now
Expand All @@ -23,6 +23,10 @@ def perform

private

def no_more_active_roles?
person.roles.without_alumnus.roles_in_layer(person.id, group.layer_group_id).any?
end

def group
@group ||= Group.find(@group_id)
end
Expand Down

0 comments on commit 2f215ea

Please sign in to comment.