search for: zippedresponse

Displaying 1 result from an estimated 1 matches for "zippedresponse".

2006 Jan 19
0
Strange thing with ActiveRecord ??
...'item_names'' varchar column. I want to create a comma separated string of ''names''. I have an ''add_item_names'' method which takes a ''name'' and put it at the end of a string with a preceding comma. The model goes like this: class ZippedResponse < ActiveRecord::Base def add_item_names (name) str = read_attribute(:item_names) str << "," unless str.empty? str << name write_attribute(:item_names, str) end end Now in the console, I write z=ZippedResponse.new z.add_item_names("a...