Skip to content

Commit a5ea9f1

Browse files
Move primary email to the bottom
1 parent f14d0a6 commit a5ea9f1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/workos/directory_user.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ def to_json(*)
5252
merge(authorization_attributes)
5353
end
5454

55-
# @deprecated Will be removed in a future major version. Use {#email} instead.
56-
def primary_email
57-
primary_email = (emails || []).find { |email| email[:primary] }
58-
return primary_email[:value] if primary_email
59-
end
60-
6155
private
6256

6357
def base_attributes
@@ -87,5 +81,13 @@ def authorization_attributes
8781
roles: roles,
8882
}
8983
end
84+
85+
public
86+
87+
# @deprecated Will be removed in a future major version. Use {#email} instead.
88+
def primary_email
89+
primary_email = (emails || []).find { |email| email[:primary] }
90+
return primary_email[:value] if primary_email
91+
end
9092
end
9193
end

0 commit comments

Comments
 (0)