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

end

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?

Thanks!
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to