adding custom fields dynamically to a model
- by pankajbhageria
I have a model called List which has many records:
class List
has_many :records
end
class Record
end
The table Record has 2 permanent fields: name, email.
Besides these 2 fields, for each List a Record can have 'n' custom fields.
For example: for list1 I add address(text), dob(date) as custom fields.
Then while adding records to list one, each record can have values for address and dob.
Is there any ActiveRecord plugin which provides this type of functionality?
Or else could you share your thoughts on how to model this?
Thanks in advance,
Pankaj