Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. [32] pry(main)> PostFavorite.where('user_id <> 20').pluck(:post_id).include?(26)
  2. (0.5ms) SELECT "post_favorites"."post_id" FROM "post_favorites" WHERE (user_id <> 20)
  3. => true
  4. [33] pry(main)> PostFavorite.find(687)
  5. PostFavorite Load (0.3ms) SELECT "post_favorites".* FROM "post_favorites" WHERE "post_favorites"."id" = $1 LIMIT 1 [["id", 687]]
  6. => #<PostFavorite:0x007f7fa68f9530
  7. id: 687,
  8. post_id: 26,
  9. user_id: 20,
  10. status: "Upvote",
  11. created_at: Fri, 28 Apr 2017 04:08:51 UTC +00:00,
  12. updated_at: Fri, 28 Apr 2017 04:08:51 UTC +00:00,
  13. imported_id: nil,
  14. is_imported: false,
  15. import_source: nil>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement