ですから、これは少し簡単な質問です。次のようなアクティブなレコード オブジェクトがあります。
Item
--id
--attribute
「Item」の配列を属性キーで分割する必要があるので、このようにいろいろな配列を分割したいです。
[<#Item :id => 1, :attribute => 1>,<#Item :id => 4, :attribute => 1>,<#Item :id => 7, :attribute => 1>]
[<#Item :id => 2, :attribute => 2>,<#Item :id => 5, :attribute => 2>,<#Item :id => 8, :attribute => 2>]
[<#Item :id => 3, :attribute => 3>,<#Item :id => 6, :attribute => 3>,<#Item :id => 9, :attribute => 3>]
どうすればいいですか?