>> > Does DM let multiple values into a same field?
>>
>> > This would be very interesting. Imagine a field that can have multiple
>> > values (as nickname or family_name). In that case the user would have
>> > that separate them with a comma, and the validations would have made
>> > to each value.
What's wrong with:
def nickname=(nicknames)
# normalize the input
nicknames = nicknames.split(/,\s*/).join(",")
attribute_set(:nickname, nicknames)
end
def nickname
attribute_get(:nickname).split(",")
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---