Skip to content

Instantly share code, notes, and snippets.

@onlymejosh
Created July 14, 2010 16:33
Show Gist options
  • Save onlymejosh/475647 to your computer and use it in GitHub Desktop.
Save onlymejosh/475647 to your computer and use it in GitHub Desktop.
def self.new_from lead
new do |contact|
contact.first_name = lead.first_name
contact.last_name = lead.last_name
contact.email = lead.email
contact.phone = lead.phone
contact.notes = lead.notes
contact.facebook = lead.facebook
contact.twitter = lead.twitter
contact.where = lead.where
end
end
def convert_to_contact
@lead = Lead.find(params[:id])
Contact.new_from @lead
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment