activerecordで空配列風にactiverecordを返す方法。Rails4ならデフォでnoneでできる。

nyangrynyangry のブックマーク 2014/02/20 17:19

その他

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

How to return an empty ActiveRecord relation?

    If I have a scope with a lambda and it takes an argument, depending on the value of the argument, I might know that there will not be any matches, but I still want to return a relation, not an empt...

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

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