Open yuyanegishi opened 5 years ago
Micropost.where("user_id = 1")
=>#<ActiveRecord::Relation [#<Micropost id: 303, content: "テストテスト", user_id: 1, created_at: "2018-11-29 06:08:08", updated_at: "2018-11-29 06:08:08", picture: nil>, #<Micropost id: 295, content: "Ipsa voluptatem modi et a omnis.", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 289, content: "Commodi aut quam optio ipsum in aut voluptas reici...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 283, content: "Ducimus eos repudiandae labore quia dolorem sit.", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 277, content: "Nostrum accusamus ullam ut ducimus praesentium non...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 271, content: "Et et veritatis repudiandae voluptatibus unde labo...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 265, content: "Eos doloribus quisquam itaque quam sed autem accus...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 259, content: "Veniam aspernatur voluptate deserunt in repellendu...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 253, content: "Nisi ipsam optio officia quidem tenetur in corpori...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, #<Micropost id: 247, content: "Fugiat vel deleniti quos corporis quo consectetur ...", user_id: 1, created_at: "2018-11-22 01:14:29", updated_at: "2018-11-22 01:14:29", picture: nil>, ...]>
内容
リファレンスの確認 ※スッキリわかるSQL入門
内容
リファレンスの確認 ※スッキリわかるSQL入門、Ruby on Rails API