はじめに 今回はfind・find_by・whereについて紐解いていきます。 バージョン rails:5.1.6 #主キー(id)が1のbookを検索 > Book.find(1) => #<Book:0x007fb51c8131b0 id: 1, title: "hoge", price: 1250, publish: "fuga", created_at: Sat, 05 May 2018 05:42:47 UTC +00:00, updated_at: Sat, 05 May 2018 05:42:47 UTC +00:00> > Book.find(1,2) #Book.find([1,2])でも可 => [#<Book:0x007fb51b0636f0 id: 1, title: "hoge", price: 1250, publish: "fuga", created_at: