Created
March 16, 2015 19:21
-
-
Save bradyswenson/3842a3ae5bd11e5ab7d8 to your computer and use it in GitHub Desktop.
@posts = Category.where(id: 1).posts
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
irb(main):044:0> @posts = Category.where(id: 1).posts | |
NoMethodError: Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 | |
undefined method `posts' for #<ActiveRecord::Relation::ActiveRecord_Relation_Category:0x000001046fe4d8> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment