Skip to content

Conversation

@tinderfields
Copy link

No description provided.

README.md Outdated
- `list_item.lower_item`
- `list_item.lower_items` will return all the items below `list_item` in the list (ordered by the position, ascending)

## Adding ActsAsList To An Existing Model
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency can you call it acts_as_list (use backticks)?

- `list_item.lower_items` will return all the items below `list_item` in the list (ordered by the position, ascending)

## Adding `acts_as_list` To An Existing Model
As it stands ActsAsList requires position values to be set on the model before the instance methods above will work. Adding something like the below to your migration will set the default position. Change the parameters to order if you want a different initial ordering.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be swapped to acts_as_list also :)

@brendon
Copy link
Owner

brendon commented Jun 23, 2016

Just that one tweak and I'll merge this for you :)

@brendon
Copy link
Owner

brendon commented Aug 20, 2016

@tinderfields, do you want to finish off that one change and I can close and merge this :)

@brendon brendon changed the title Update readme with info on retroactively adding acts_as_list #209 Update readme with info on retroactively adding acts_as_list Nov 27, 2016
@brendon brendon closed this in 04653de Nov 27, 2016
@brendon
Copy link
Owner

brendon commented Nov 27, 2016

I've taken your update and created my own commit on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants