mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
re: RuboCop - get rid of redundant curly braces around a hash parameter
This commit is contained in:
@@ -7,10 +7,10 @@ module ActiveModel
|
||||
@author = Author.new(name: 'Steve K.')
|
||||
@author.bio = nil
|
||||
@author.roles = []
|
||||
@blog = Blog.new({ name: 'AMS Blog' })
|
||||
@post = Post.new({ title: 'New Post', body: 'Body' })
|
||||
@tag = Tag.new({ name: '#hashtagged' })
|
||||
@comment = Comment.new({ id: 1, body: 'ZOMG A COMMENT' })
|
||||
@blog = Blog.new(name: 'AMS Blog')
|
||||
@post = Post.new(title: 'New Post', body: 'Body')
|
||||
@tag = Tag.new(name: '#hashtagged')
|
||||
@comment = Comment.new(id: 1, body: 'ZOMG A COMMENT')
|
||||
@post.comments = [@comment]
|
||||
@post.tags = [@tag]
|
||||
@post.blog = @blog
|
||||
@@ -19,7 +19,7 @@ module ActiveModel
|
||||
@post.author = @author
|
||||
@author.posts = [@post]
|
||||
|
||||
@post_serializer = PostSerializer.new(@post, { custom_options: true })
|
||||
@post_serializer = PostSerializer.new(@post, custom_options: true)
|
||||
@author_serializer = AuthorSerializer.new(@author)
|
||||
@comment_serializer = CommentSerializer.new(@comment)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user