I want to store person / company contacts with addresses and relations. Addresses can have multiple lines for streets, phonenumbers and emails. Would be also nice to have some kind of export feature.
Contacthandling seems like a common task, so i want to know how others are doing this job.
I had a look at the following gems and applications:
https://github.com/pluginaweek/has_addresses
demonstrates a reference implementation for handling countries, regions, and addresses
https://github.com/midas/addressable_record
Encapsulates the composed of pattern for addresses into any easy to use library
https://github.com/huerlisi/has_vcards
Rails plugin providing VCard like contact and address models and helpers
https://github.com/fraser/vpim-rails
vPim for rails provides calendaring, scheduling, and contact support for Ruby through the standard iCalendar and vCard data formats for "personal information" exchange
https://github.com/jwood/addressbook
An address book web application (Rails) that stores phone numbers, addresses, and prints mailing labels
Are you using one of the mentioned gems, can you recommend other gems or do you implement this on your own (why and how)?
Address handling is actually a very complex subject. That is the reason there are so many different implementations. Take a look at Martin Fowlers Party, Role Object and Accountability patterns. You might also run into i18n problems, and might want to do decent normalization (with street, zip, city, state, country objects, and structure depending on the country). Then these are all temporal relationships, and your application demands determine how much history to register.
vPim appears to be what you need. It has Rails support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With