mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
fixes hound again
This commit is contained in:
parent
60b0d69a72
commit
7f8bb9be53
1 changed files with 6 additions and 4 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue