I have lets say 5 models.
Thread
Poll
Message
Wall
Zone
I would like something where I can loop through each model contained in the string or array, and if that model has a user_id field, update it to whatever I’d like to set it to.
Any Idea on how you can do something like
[Thread.where(:user_id => XXX)].each do |model|
...
end
Where Thread is looped through in a list of models [“Thread”, “Poll”, ….]
Thanks
try this: