views:

129

answers:

1

I'm creating a mailing list manager using rails.

I've toyed with the idea of generating my own database; one contact will have many details (phone numbers, emails, addresses etc).

But this got me thinking about how others would have done it, and then why not store contacts as vCards in the database. Plus, there's even a gem that helps with that: VPIM.

However, there may be certain pitfalls, especially with rails. It might result in additional code to handle forms, since VPIM vCards are not ActiveRecord objects and it isn't very rails like.

What I would like to know is what would be an elegant solution to storing contacts in a rails application? Roll your own or what?

+1  A: 

For best compatibility with Rails, you would probably save yourself a lot of headaches by using a standard database backend for ActiveRecord to communicate with. Then on your model object you should be able to easily implement a method that returns the vCard format or any other format you need. Hope this helps!

Adam Alexander
Is there any tutorial where I can find how others have done this? I mean, it can't be as simple as one contact has many details, or can it?
Jaryl