Fix remix render method
This commit is contained in:
parent
f154e898bc
commit
197aad8a8d
1 changed files with 3 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ module Api
|
||||||
party = Party.new
|
party = Party.new
|
||||||
party.user = current_user if current_user
|
party.user = current_user if current_user
|
||||||
party.attributes = party_params if party_params
|
party.attributes = party_params if party_params
|
||||||
|
ap party
|
||||||
|
|
||||||
# unless party_params.empty?
|
# unless party_params.empty?
|
||||||
# party.attributes = party_params
|
# party.attributes = party_params
|
||||||
|
|
@ -76,8 +77,8 @@ module Api
|
||||||
new_party.local_id = party_params[:local_id] if !party_params.nil?
|
new_party.local_id = party_params[:local_id] if !party_params.nil?
|
||||||
|
|
||||||
if new_party.save
|
if new_party.save
|
||||||
render json: PartyBlueprint.render(new_party, view: :created, root: :party,
|
render json: PartyBlueprint.render(new_party, view: :created, root: :party),
|
||||||
meta: { remix: true })
|
status: :created
|
||||||
else
|
else
|
||||||
render_validation_error_response(new_party)
|
render_validation_error_response(new_party)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue