From 7618c6f6976fb194f9ceb5e4a70c935b7644181a Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Wed, 6 Mar 2024 14:15:18 +1300 Subject: [PATCH] Tweak README to add scalar position to strong parameters --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9c8ed8..224ce57 100644 --- a/README.md +++ b/README.md @@ -155,11 +155,11 @@ item.update position: {after: 11} It can be tricky to provide the hash forms of relative positioning using Rails form helpers, but it is possible. We've declared a special `Struct` for you to use for this purpose. -Firstly you need to allow nested Strong Parameters for the `position` column like so: +Firstly you need to allow both scalar and nested Strong Parameters for the `position` column like so: ```ruby def item_params - params.require(:item).permit :name, position: [:before] + params.require(:item).permit :name, :position, position: [:before] end ```