我正在从数据库中获取一些结果:
@log_detail = connection.execute("SELECT logs,setup FROM mastertest WHERE test_ins_id LIKE blah blah blah");
结果
logs = a/atf/something
setup = tb-1-atf with ac-2115
我想
logs = atf/something
setup = 2115
我为日志尝试了以下操作,但它似乎不起作用
@log_detail.each do |row|
row[0] = row[0].drop(2)
end