Open phinjensen opened 6 years ago
original author: Kent K.
date: 2014-10-06T03:39:44-04:00
Nice suggestion. While reading it, I couldn't help but consider the possibilities of using composed_of. I think this could plug in very well to Devise provided User accounts.
composed_of :email_address, class_name: "Mail::Address", mapping: [[:email], :first_name], [:last_name]], constructor: ->(email, first_name, last_name) {Mail::Address.new("#{first_name} #{last_name} <#{email}>")})
Comments for https://www.endpointdev.com/blog/2014/10/parsing-email-addresses-in-rails/ By Patrick Lewis
To enter a comment: