在Rails 3.2控制台中,我试图将几个记录更新为相同的值。阵列的Rails 3 update_attributes
例如:
h=Person.find_all_by_company_country("Alabama")
现在我想改变company_country为 “得克萨斯”
例如:
h.update_attributes(company_country: "Texas")
NoMethodError: undefined method `update_attributes' for #<Array:0x00000003b01d70>
什么是做到这一点的选择?
不会更新所有人员属性。我只想要与阿拉巴马州的人改变 – DDDD