I have a table that will have a changing number of columns. In order to
update them, I need to able to keep my column names in a variable, and
pass them to my model object. Such as:
@entry = Model.create
@columns.each do |column|
@entry.column = 'something'
Obviously, this doesn't work. Is there any method in ActiveRecord that
would allow me to pass a string as the column name? ie:
Or is there a better way to handle a changing set of columns?
Maybe... update_attribute or update_attributes?