{"id":13508800,"url":"https://github.com/zovafit/ecto-ordered","last_synced_at":"2025-12-11T23:37:16.402Z","repository":{"id":25747989,"uuid":"29185831","full_name":"zovafit/ecto-ordered","owner":"zovafit","description":"Ecto extension for ordered models","archived":false,"fork":false,"pushed_at":"2017-10-12T18:07:02.000Z","size":49,"stargazers_count":41,"open_issues_count":12,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-03T14:48:38.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zovafit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-13T10:55:37.000Z","updated_at":"2024-12-26T07:34:37.000Z","dependencies_parsed_at":"2022-08-24T14:13:28.149Z","dependency_job_id":null,"html_url":"https://github.com/zovafit/ecto-ordered","commit_stats":null,"previous_names":["trustatom-oss/ecto-ordered"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zovafit%2Fecto-ordered","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zovafit%2Fecto-ordered/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zovafit%2Fecto-ordered/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zovafit%2Fecto-ordered/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zovafit","download_url":"https://codeload.github.com/zovafit/ecto-ordered/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314012,"owners_count":20757453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:58.631Z","updated_at":"2025-10-21T15:10:22.834Z","avatar_url":"https://github.com/zovafit.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"EctoOrdered\n===========\n\nEcto extension to support ordered list items. Similar to [acts_as_list](https://github.com/swanandp/acts_as_list), but\nfor [Ecto](https://github.com/elixir-lang/ecto)\n\nExamples\n--------\n\n```elixir\n# Global positioning\ndefmodule MyModel do\n  use Ecto.Schema\n  import EctoOrdered\n\n  schema \"models\" do\n    field :position, :integer, virtual: true\n    field, :rank, :integer\n  end\n  \n  def changeset(model, params) do\n    model\n    |\u003e cast(params, [], [:position])\n    |\u003e set_order(:position)\n  end\nend\n\n# Scoped positioning\ndefmodule MyModel do\n  use Ecto.Model\n  use EctoOrdered, scope: :reference_id\n\n  schema \"models\" do\n    field :reference_id, :integer\n    field :position,     :integer, virtual: true\n  end\n  \n  def changeset(model, params) do\n    model\n    |\u003e cast(params, [], [:position, :reference_id])\n    |\u003e set_order(:position, :reference_id)\n  end\nend\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzovafit%2Fecto-ordered","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzovafit%2Fecto-ordered","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzovafit%2Fecto-ordered/lists"}