Move SerializableResource to ActiveModelSerializers namespace

Ref. https://github.com/rails-api/active_model_serializers/pull/1310
This commit is contained in:
Yohan Robert
2016-03-19 06:13:32 +01:00
parent 874b8cab30
commit 21cb896802
28 changed files with 179 additions and 162 deletions

View File

@@ -312,9 +312,9 @@ module ActiveModelSerializers
end
def test_no_duplicates
hash = ActiveModel::SerializableResource.new(@post1, adapter: :json_api,
include: '*.*')
.serializable_hash
hash = ActiveModelSerializers::SerializableResource.new(@post1, adapter: :json_api,
include: '*.*')
.serializable_hash
expected = [
{
type: 'authors', id: '1',
@@ -340,10 +340,10 @@ module ActiveModelSerializers
end
def test_no_duplicates_collection
hash = ActiveModel::SerializableResource.new(
hash = ActiveModelSerializers::SerializableResource.new(
[@post1, @post2], adapter: :json_api,
include: '*.*')
.serializable_hash
.serializable_hash
expected = [
{
type: 'authors', id: '1',
@@ -361,7 +361,7 @@ module ActiveModelSerializers
end
def test_no_duplicates_global
hash = ActiveModel::SerializableResource.new(
hash = ActiveModelSerializers::SerializableResource.new(
@nestedpost1,
adapter: :json_api,
include: '*').serializable_hash
@@ -380,7 +380,7 @@ module ActiveModelSerializers
end
def test_no_duplicates_collection_global
hash = ActiveModel::SerializableResource.new(
hash = ActiveModelSerializers::SerializableResource.new(
[@nestedpost1, @nestedpost2],
adapter: :json_api,
include: '*').serializable_hash