ecto_ranked v0.1.3 EctoRanked

This module provides support for automatic ranking of your Ecto models.

Summary

Functions

Updates the given changeset with the appropriate ranking, and updates/ranks the other items in the list as necessary

Functions

set_rank(changeset, opts \\ [])

Updates the given changeset with the appropriate ranking, and updates/ranks the other items in the list as necessary.

Options

  • :rank - the field to store the actual ranking in. Defaults to :rank
  • :position - the field to use for positional changes. Defaults to :position
  • :scope - the field to scope all ranking to. Defaults to nil (no scoping).