Hi
I’m new to rails and I want to create an object named element with can
hold sevral properties names and values.
for example :
e = Element.create()
e.add(:name => “x”, :value => 800)
e.add(:name => “y”, :value => 600)
e.add(:name => “whatever”, :value => “anything”)
e.get(:name => “x”) #-> 800
e.get(:name => “y”) #-> 300
e.get(:name => “whatever”) #-> anything
i was thinkings add the object var which holds (id, element_id, name,
value)
with a relationship of element has_many vars.
how do i create the getter ? (e.get(:name => “x”)
and the setter ?
thanks.
anyone used this plugin http://svn.nkryptic.com/ ?