Skip to content

Commit 3857076

Browse files
committed
Update top-level link with PR #1247
1 parent ae547bf commit 3857076

File tree

5 files changed

+13
-139
lines changed

5 files changed

+13
-139
lines changed

docs/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ This is the documentation of ActiveModelSerializers, it's focused on the **0.10.
2424
- [Using ActiveModelSerializers Outside Of Controllers](howto/outside_controller_use.md)
2525
- [How to add top-level links](howto/add_top_level_links.md) (```JSON-API``` only)
2626

27-
## Getting Help
28-
29-
If you find a bug, please report an [Issue](https://github.com/rails-api/active_model_serializers/issues/new).
30-
31-
If you have a question, please [post to Stack Overflow](http://stackoverflow.com/questions/tagged/active-model-serializers).
32-
33-
Thanks!
34-
>>>>>>> Adds support for top-level links to JsonApi adapter
35-
3627
## Integrations
3728

3829
| Integration | Supported ActiveModelSerializers versions | Gem name and/or link

lib/active_model/serializer/adapter/json_api/links.rb

Lines changed: 0 additions & 25 deletions
This file was deleted.

test/action_controller/serialization_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ def test_render_array_using_implicit_serializer_and_links
272272
data: [
273273
{
274274
id: assigns(:profiles).first.id.to_s,
275-
type: "profiles",
275+
type: 'profiles',
276276
attributes: {
277-
name: "Name 1",
278-
description: "Description 1"
277+
name: 'Name 1',
278+
description: 'Description 1'
279279
}
280280
}
281281
],
282282
links: {
283-
self: "http://example.com/api/profiles/1"
283+
self: 'http://example.com/api/profiles/1'
284284
}
285285
}
286286

test/adapter/json_api/links_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ def test_toplevel_links
4343
assert_equal(expected, hash[:links])
4444
end
4545

46+
def test_nil_toplevel_links
47+
hash = ActiveModel::SerializableResource.new(
48+
@post,
49+
adapter: :json_api,
50+
links: nil
51+
).serializable_hash
52+
assert_equal(nil, hash[:links])
53+
end
54+
4655
def test_resource_links
4756
hash = serializable(@author, adapter: :json_api).serializable_hash
4857
expected = {

test/adapter/json_api/top_level_links_test.rb

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)