add first name var

This commit is contained in:
Pete Matsyburka committed 2024-09-02 20:11:13 +03:00
1 parent a04c04141c
commit b16322dd5b
2 files changed
+12

No files matched your search

+8
View File
@@ -85,6 +85,14 @@ class Submitter < ApplicationRecord
end
end
def first_name
name.split(/\s+/, 2).first
end
def last_name
name.split(/\s+/, 2).last
end
def status_event_at
declined_at || completed_at || opened_at || sent_at || created_at
end