fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560)
fixes the warning: Rendering actions with '.' in the name is deprecated
This commit is contained in:
committed by
GitHub
parent
cd4c1ef27e
commit
bd445216e9
@@ -6,6 +6,6 @@ json.action resource.action
|
||||
json.button resource.action
|
||||
json.hooks do
|
||||
json.array! @current_account.hooks.where(app_id: resource.id) do |hook|
|
||||
json.partial! 'api/v1/models/hook.json.jbuilder', resource: hook
|
||||
json.partial! 'api/v1/models/hook', formats: [:json], resource: hook
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,10 +3,10 @@ json.title resource.title
|
||||
json.description resource.description
|
||||
json.account_id resource.account_id
|
||||
json.inbox do
|
||||
json.partial! 'api/v1/models/inbox.json.jbuilder', resource: resource.inbox
|
||||
json.partial! 'api/v1/models/inbox', formats: [:json], resource: resource.inbox
|
||||
end
|
||||
json.sender do
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: resource.sender if resource.sender.present?
|
||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: resource.sender if resource.sender.present?
|
||||
end
|
||||
json.message resource.message
|
||||
json.campaign_status resource.campaign_status
|
||||
|
||||
@@ -14,7 +14,7 @@ json.last_activity_at resource.last_activity_at.to_i if resource[:last_activity_
|
||||
if defined?(with_contact_inboxes) && with_contact_inboxes.present?
|
||||
json.contact_inboxes do
|
||||
json.array! resource.contact_inboxes do |contact_inbox|
|
||||
json.partial! 'api/v1/models/contact_inbox.json.jbuilder', resource: contact_inbox
|
||||
json.partial! 'api/v1/models/contact_inbox', formats: [:json], resource: contact_inbox
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
json.source_id resource.source_id
|
||||
json.inbox do
|
||||
json.partial! 'api/v1/models/inbox.json.jbuilder', resource: resource.inbox
|
||||
json.partial! 'api/v1/models/inbox', formats: [:json], resource: resource.inbox
|
||||
end
|
||||
|
||||
@@ -5,13 +5,13 @@ json.account_id resource.account_id
|
||||
json.message_id resource.message_id
|
||||
if resource.contact
|
||||
json.contact do
|
||||
json.partial! 'api/v1/models/contact.json.jbuilder', resource: resource.contact
|
||||
json.partial! 'api/v1/models/contact', formats: [:json], resource: resource.contact
|
||||
end
|
||||
end
|
||||
json.conversation_id resource.conversation.display_id
|
||||
if resource.assigned_agent
|
||||
json.assigned_agent do
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: resource.assigned_agent
|
||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: resource.assigned_agent
|
||||
end
|
||||
end
|
||||
json.created_at resource.created_at.to_i
|
||||
|
||||
@@ -4,13 +4,13 @@ json.visibility macro.visibility
|
||||
|
||||
if macro.created_by.present?
|
||||
json.created_by do
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: macro.created_by
|
||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: macro.created_by
|
||||
end
|
||||
end
|
||||
|
||||
if macro.updated_by.present?
|
||||
json.updated_by do
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: macro.updated_by
|
||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: macro.updated_by
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ json.account_id json.account_id
|
||||
json.contact_id json.contact_id
|
||||
if resource.user.present?
|
||||
json.user do
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: resource.user
|
||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: resource.user
|
||||
end
|
||||
end
|
||||
json.created_at resource.created_at.to_i
|
||||
|
||||
Reference in New Issue
Block a user