On 3/19/07, Ryan King <[EMAIL PROTECTED]> wrote:

Of course, if you were to make, for example, your Person model use
the same field names as hCard/vCard you could skip the step of
figuring out how to represent a person (again).

Yep.  You could also use alias_attribute if the model fields and the
microformat fields don't match up and you don't need any special
processing to coerce the uf data.

For example, if you have an hCard and you're using the 'bday'
attribute but your model has a 'date_of_birth' field:

alias_attribute :bday, :date_of_birth

Now you can @person.bday = Time.now (or something) and it'll be
functionally the same as @person.date_of_birthday = Time.now.

However, I gotta say: posting HTML is kind of awkward.  Isn't it?
Microformats are for publishing and talk of posting them to endpoints
kinda gives me the willies...

--
Chris Wanstrath
http://errtheblog.com
_______________________________________________
microformats-rest mailing list
[email protected]
http://microformats.org/mailman/listinfo/microformats-rest

Reply via email to