Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Make name optional for subscribers
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhil Naini committed Dec 20, 2012
1 parent ee14c56 commit 8916aa0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/yesmail/subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ def make_hash

def data
@attribute_data ||= {}
{
email: email,
name_data = name.blank? ? {} : {
firstName: first_name,
lastName: last_name
}.merge(attribute_data)
}

{
email: email
}.merge(name_data).merge(attribute_data)
end

# These name methods aren't really safe. They might just blow up if the
Expand Down

0 comments on commit 8916aa0

Please sign in to comment.