Update top-level link with PR #1247

update according rubocop rules
This commit is contained in:
Leandro Cesquini Pereira
2015-12-23 09:32:53 -02:00
parent 1844c162f1
commit 37e4f1c30c
4 changed files with 15 additions and 133 deletions

View File

@@ -47,12 +47,11 @@ module ActionController
def render_array_using_implicit_serializer_and_links
with_adapter ActiveModel::Serializer::Adapter::JsonApi do
@profiles = [
Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
]
render json: @profiles, links: { self: "http://example.com/api/profiles/1" }
render json: @profiles, links: { self: 'http://example.com/api/profiles/1' }
end
end
@@ -272,15 +271,15 @@ module ActionController
data: [
{
id: assigns(:profiles).first.id.to_s,
type: "profiles",
type: 'profiles',
attributes: {
name: "Name 1",
description: "Description 1"
name: 'Name 1',
description: 'Description 1'
}
}
],
links: {
self: "http://example.com/api/profiles/1"
self: 'http://example.com/api/profiles/1'
}
}