Skip to content

Commit

Permalink
Simplify build_person method
Browse files Browse the repository at this point in the history
  • Loading branch information
njaeggi committed Dec 17, 2024
1 parent c8b3553 commit 0ce543f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/models/wizards/signup/abo_basic_login_wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ def save!

def build_person
if current_user.present?
person = current_user.tap do |person|
role = person.roles.build(group: group, type: group.self_registration_role_type)
yield person, role if block_given?
current_user.tap do |person|
person.roles.build(group: group, type: group.self_registration_role_type)
end
else
super do |_person, role|
Expand Down

0 comments on commit 0ce543f

Please sign in to comment.