Skip to content
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents cfb2771 + 837b730 commit 371678a280f3606449a5d412b4348b7b68e75810 @jodyalbritton committed Jul 20, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/models/message.rb
View
6 app/models/message.rb
@@ -23,7 +23,11 @@ def find_sender
def get_sender
unless source == "CONTACT_FORM_USER"
- Contact.find_by(:email => email)
+ Contact.find_or_create_by(:email => email) do |contact|
+ name_array = full_name.split
+ contact.first_name = name_array[0]
+ contact.last_name = name_array[1]
+ end
else
Contact.find_or_create_by(:email => email) do |contact|

0 comments on commit 371678a

Please sign in to comment.
Something went wrong with that request. Please try again.