mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove controller :assigns warnings/shim
This commit is contained in:
@@ -32,7 +32,7 @@ module ActionController
|
||||
|
||||
expected = {
|
||||
data: {
|
||||
id: assigns(:profile).id.to_s,
|
||||
id: @controller.instance_variable_get(:@profile).id.to_s,
|
||||
type: 'profiles',
|
||||
attributes: {
|
||||
name: 'Name 1',
|
||||
|
||||
@@ -103,9 +103,9 @@ module ActionController
|
||||
{
|
||||
'title' => 'New Post',
|
||||
'body' => 'Body',
|
||||
'id' => assigns(:post).id,
|
||||
'id' => @controller.instance_variable_get(:@post).id,
|
||||
'comments' => [{ 'id' => 1 }, { 'id' => 2 }],
|
||||
'author' => { 'id' => assigns(:author).id }
|
||||
'author' => { 'id' => @controller.instance_variable_get(:@author).id }
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ module ActionController
|
||||
end
|
||||
expected = {
|
||||
data: {
|
||||
id: assigns(:profile).id.to_s,
|
||||
id: @controller.instance_variable_get(:@profile).id.to_s,
|
||||
type: 'profiles',
|
||||
attributes: {
|
||||
name: 'Name 1',
|
||||
@@ -246,7 +246,7 @@ module ActionController
|
||||
expected = {
|
||||
data: [
|
||||
{
|
||||
id: assigns(:profiles).first.id.to_s,
|
||||
id: @controller.instance_variable_get(:@profiles).first.id.to_s,
|
||||
type: 'profiles',
|
||||
attributes: {
|
||||
name: 'Name 1',
|
||||
@@ -269,7 +269,7 @@ module ActionController
|
||||
expected = {
|
||||
data: [
|
||||
{
|
||||
id: assigns(:profiles).first.id.to_s,
|
||||
id: @controller.instance_variable_get(:@profiles).first.id.to_s,
|
||||
type: 'profiles',
|
||||
attributes: {
|
||||
name: 'Name 1',
|
||||
|
||||
Reference in New Issue
Block a user