I’m calling this action from within another action:
edit_meta(@table_meta_id, @field, @content)
where @field is an attribute name for a Model. @table_meta_id is the id
and @content is the new value for that attribute.
The edit_meta action looks like this:
def edit_meta(id, field, content)
@meta = Model.find(:all, :conditions => ["id = ?", id]) @meta.field = content @meta.updated_at = now() @meta.save
Problem is that I can’t figure out how to get the field argument to tell
my model which attribute I want to change. I just get a “NoMethodError”.
How do I do that?