Last active
August 29, 2015 14:25
-
-
Save manicExpressive/fd82d27d082c463de566 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
irb(main):056:0> c.posts.all.count | |
=> 2 | |
irb(main):045:0* x.posts.all.count | |
=> 0 | |
irb(main):046:0> x.posts.each do |p| | |
irb(main):047:1* puts p.id | |
irb(main):048:1> end | |
=> [] | |
irb(main):049:0> u | |
=> #<User uuid: "2324bdd0-095f-45d1-b460-ef4a49f8994f", authentication_token: "zo1ksxTiyoYzVcbyHgBh", confirmation_sent_at: nil, confirmation_token: nil, confirmed_at: Thu, 23 Jul 2015 04:47:50 +0000, created_at: Thu, 23 Jul 2015 04:47:51 +0000, current_sign_in_at: Thu, 23 Jul 2015 05:00:43 +0000, current_sign_in_ip: "127.0.0.1", email: "[email protected]", encrypted_password: "$2a$10$G2gSbYsP621pxvSqK.EszO6eHvyrTJxZiN9yGZTDAb3S2zgbCxxNy", facebook_token: nil, first_name: "James", last_name: "Madison", last_sign_in_at: Thu, 23 Jul 2015 05:00:43 +0000, last_sign_in_ip: "127.0.0.1", remember_created_at: nil, reset_password_sent_at: nil, reset_password_token: nil, sign_in_count: 26, tos: nil, unconfirmed_email: nil, updated_at: Thu, 23 Jul 2015 05:00:43 +0000> | |
irb(main):050:0> u.channels.all.count | |
=> 2 | |
irb(main):051:0> u.channels.each do |c| | |
irb(main):052:1* puts c.name | |
irb(main):053:1> puts c.posts.all.count | |
irb(main):054:1> puts c.posts.first.id | |
irb(main):055:1> end | |
Paleo Recipes | |
2 | |
322aede9-233e-41bc-8387-e8ed18aff53b | |
So, pedestrian. | |
2 | |
322aede9-233e-41bc-8387-e8ed18aff53b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I add posts to c, both x and c get them. When I add posts to x they don't show up in the index API.
show method still works fine here.