From 86f54f92ddc885449fa0343db2c09c488e2340b6 Mon Sep 17 00:00:00 2001 From: Giedrius Rimkus Date: Fri, 14 Jun 2024 11:01:34 +0300 Subject: [PATCH] Update records-reordering.md Typo in gem name, acts_as_list instead of act_as_list. --- docs/3.0/records-reordering.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/3.0/records-reordering.md b/docs/3.0/records-reordering.md index c2af13a6..c1ab39dc 100644 --- a/docs/3.0/records-reordering.md +++ b/docs/3.0/records-reordering.md @@ -13,7 +13,7 @@ The actions are simple lambda functions but coupled with your logic or an orderi ## Configuration -I'll demonstrate the ordering feature using the `act_as_list` gem. +I'll demonstrate the ordering feature using the `acts_as_list` gem. Install and configure the gem as instructed in the [tutorials](https://github.com/brendon/acts_as_list#example). Please ensure you [give all records position attribute values](https://github.com/brendon/acts_as_list#adding-acts_as_list-to-an-existing-model), so the gem works fine. @@ -33,7 +33,7 @@ class Avo::Resources::CourseLink < Avo::BaseResource end ``` -The `record` is the actual instantiated model. The `move_higher`, `move_lower`, `move_to_top`, and `move_to_bottom` methods are provided by `act_as_list`. If you're not using that gem, you can add your logic inside to change the position of the record. +The `record` is the actual instantiated model. The `move_higher`, `move_lower`, `move_to_top`, and `move_to_bottom` methods are provided by `acts_as_list`. If you're not using that gem, you can add your logic inside to change the position of the record. The actions have access to `record`, `resource`, `options` (the `ordering` class attribute) and `params` (the `request` params).