Skip to content

Commit 8f4457a

Browse files
committed
LabConnect: Use params.expect
1 parent b407268 commit 8f4457a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

app/controllers/lab_connect/diagnostic_reports_controller.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ def set_diagnostic_report
2525
end
2626

2727
def diagnostic_report_params
28-
params.permit(diagnostic_report: [
29-
{ results_attributes: %i[id lab_test_value_id value] },
30-
notes_attributes: %i[id content department_id]
31-
]).require(:diagnostic_report)
28+
params.expect(diagnostic_report: [
29+
{ results_attributes: [ [
30+
:id,
31+
:lab_test_value_id,
32+
:value
33+
] ] },
34+
notes_attributes: [ [
35+
:id,
36+
:content,
37+
:department_id
38+
] ]
39+
])
3240
end
3341
end
3442
end

0 commit comments

Comments
 (0)