fixes hound again

This commit is contained in:
Mojca Lorber 2016-08-29 13:59:51 +02:00
parent 60b0d69a72
commit 7f8bb9be53

View file

@ -81,13 +81,14 @@ class SamplesController < ApplicationController
errors.delete_if { |k, v| v.blank? }
if errors.empty?
format.json
render json:
render json: {
id: sample.id,
flash: t(
'samples.create.success_flash',
sample: sample.name,
organization: @organization.name
),
)
},
status: :ok
else
format.json { render json: errors, status: :bad_request }
@ -236,13 +237,14 @@ class SamplesController < ApplicationController
scf_to_delete.map(&:destroy)
format.json
render json:
render json: {
id: sample.id,
flash: t(
'samples.update.success_flash',
sample: sample.name,
organization: @organization.name
),
)
},
status: :ok
else
format.json { render json: errors, status: :bad_request }