-
-
Save craysiii/13cb3c7b61a48c5d5629 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[0] pry(main)> ActiveRecord::Base.connection.execute('SELECT "wikis".* FROM "wikis" INNER JOIN "collaborators" ON "wikis"."id" = "collaborators"."wiki_id" WHERE "collaborators"."user_id" = 1;') | |
(0.2ms) SELECT "wikis".* FROM "wikis" INNER JOIN "collaborators" ON "wikis"."id" = "collaborators"."wiki_id" WHERE "collaborators"."user_id" = 1; | |
=> [{"id"=>65, | |
"title"=>"some wiki title", | |
"body"=>"some body here", | |
"private"=>"f", | |
"user_id"=>9, | |
"created_at"=>"2015-09-18 20:37:55.194186", | |
"updated_at"=>"2015-09-18 20:37:55.194186", | |
"permalink"=>"some-wiki-title", | |
0=>65, | |
1=>"some wiki title", | |
2=>"some body here", | |
3=>"f", | |
4=>9, | |
5=>"2015-09-18 20:37:55.194186", | |
6=>"2015-09-18 20:37:55.194186", | |
7=>"some-wiki-title"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment