Skip to content

Commit

Permalink
Merge pull request #219 from giedriusr/patch-1
Browse files Browse the repository at this point in the history
Update records-reordering.md
  • Loading branch information
adrianthedev authored Jun 14, 2024
2 parents 0627de9 + 86f54f9 commit 506f448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/3.0/records-reordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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).

Expand Down

0 comments on commit 506f448

Please sign in to comment.