Xs = X.all.map(&:serializable_hash) 便利。

kiyo_hikokiyo_hiko のブックマーク 2017/05/25 16:16

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

How to convert ActiveRecord results into an array of hashes

    I have an ActiveRecord result of a find operation: tasks_records = TaskStoreStatus.find( :all, :select => "task_id, store_name, store_region", :conditions => ["task_status = ? and store_id = ?", "f...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう