发布时间: 2014-01-09 03:39:00
因为 Rails 中返回的是 ActiveRecord.relationship, 而不是raw Array.
e.g. # in irb [2,3,4].insert(1, 'a') # => [2,'a', 3, 4] # in Rails models = SomeModel.where(...) models.insert(1,'b') # wrong argument: 2 for 1 models.to_a.insert(1,'b') # goodBack