Merge pull request #183 from kevins90/update_readme_associations

Update association section on README.md
This commit is contained in:
Steve Klabnik
2013-01-10 10:51:05 -08:00

View File

@@ -290,7 +290,7 @@ class PostSerializer < ActiveModel::Serializer
# only let the user see comments he created.
def comments
post.comments.where(:created_by => scope)
object.comments.where(:created_by => scope)
end
end
```
@@ -317,7 +317,7 @@ class PostSerializer < ActiveModel::Serializer
has_many :comments
def include_comments?
!post.comments_disabled?
!object.comments_disabled?
end
end
```