Skip to content

Instantly share code, notes, and snippets.

@parabuzzle
Created March 30, 2015 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parabuzzle/f6c9d36af95ae13666a3 to your computer and use it in GitHub Desktop.
Save parabuzzle/f6c9d36af95ae13666a3 to your computer and use it in GitHub Desktop.
[14] pry(main)> Post.find_by_provider_and_identifier(:twitter, '515632050511298560')
[DB Master] Post Load (1.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."provider" = 'twitter' AND "posts"."identifier" = '515632050511298560' ORDER BY created DESC LIMIT 1
=> #<Post id: 33867995, user_id: 5623, identity_id: 22113, identifier: "515632050511298560", title: nil, picture: nil, url: "https://twitter.com/1OfficialAsh/status/51563205051...", body: "πŸ˜‚πŸ˜‚πŸ˜‚ The way everyone in my household is silent and ...", likes_count: 0, comments_count: nil, shares_count: 0, created_at: "2015-03-30 22:45:22", updated_at: "2015-03-30 22:45:22", created: "2014-09-26 22:40:35", provider: "twitter", video: nil, impressions_count: 824, meta: {}, hidden: false>
[15] pry(main)> ArchivedPost.find_by_provider_and_identifier(:twitter, '515632050511298560')
[DB Master] ArchivedPost Load (1.1ms) SELECT "archived_posts".* FROM "archived_posts" WHERE "archived_posts"."provider" = 'twitter' AND "archived_posts"."identifier" = '515632050511298560' ORDER BY created DESC LIMIT 1
=> #<ArchivedPost id: 33865026, user_id: 5623, identity_id: 22113, identifier: "515632050511298560", title: nil, picture: nil, url: "https://twitter.com/1OfficialAsh/status/51563205051...", body: "πŸ˜‚πŸ˜‚πŸ˜‚ The way everyone in my household is silent and ...", likes_count: 0, comments_count: nil, shares_count: 0, created: "2014-09-26 22:40:35", provider: "twitter", video: nil, impressions_count: 824, meta: {}, hidden: false, created_at: "2015-03-30 22:16:40", updated_at: "2015-03-30 22:16:40">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment