我希望在迭代tablename.attributes时删除id和abc_id,created_At和updated_at。这是我能想到的解决方案。我可以使用的任何其他最佳修复。感谢
chash = tablename.attributes // outputs hash of key and value
list = ["A", "B", "created_at", "updated_at"]
list.each do |l|
chash = chash.tap {|c| c.delete(l)}
end