mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Support overriding association methods
You can override associations to define custom scope on them.
This commit is contained in:
@@ -29,6 +29,9 @@ module ActionController
|
||||
@post2 = Post.new(id: 2, title: "Another Post", body: "Body")
|
||||
@post2.author = @author
|
||||
@post2.comments = []
|
||||
@blog = Blog.new(id: 1, name: "My Blog!!")
|
||||
@post.blog = @blog
|
||||
@post2.blog = @blog
|
||||
end
|
||||
|
||||
def render_resource_without_include
|
||||
|
||||
Reference in New Issue
Block a user