ecto_autoslug_field alternatives and similar packages
Based on the "Miscellaneous" category.
Alternatively, view ecto_autoslug_field alternatives based on common mentions on social networks and blogs.
-
ex_rated
ExRated, the Elixir OTP GenServer with the naughty name that allows you to rate-limit calls to any service that requires it. -
ex2ms
:ets.fun2ms for Elixir, translate functions to match specifications -
phone
Elixir phone number parser for numbers in international standard. -
funnel
Streaming Elixir API built upon ElasticSearch's percolation. -
std_json_io
A simple library for Elixir that provides json over STDIO -
bupe
BUPE is a Elixir ePub generator and parser (supports EPUB v3) -
gen_task
Generic Task behavior that helps encapsulate errors and recover from them in classic GenStage workers. -
countriex
All sorts of useful information about every country. A pure elixir port of the ruby Countries gem -
exprint
A printf / sprintf library for Elixir. It works as a wrapper for :io.format. -
Jisho-Elixir
A Japanese dictionary API; a wrapper around Jisho's API (http://jisho.org) -
expool
Extremely simple Process pooling and task submission in Elixir -
indicado
Technical indicator library for Elixir with no dependencies. -
ratx
Rate limiter and overload protection for erlang application -
vessel
Elixir MapReduce interfaces with Hadoop Streaming integration -
egaugex
A simple egauge parser to retrieve and parse data from egauge devices -
mixstar
Elixir Mix task to starring GitHub repository with `mix deps.get`ting dependent library -
ratekeeper
Ratekeeper is a library for scheduling rate-limited actions. -
presentex
Elixir -> HTML/JavaScript based presentation framework intended for showing Elixir code -
mixgraph
An interactive dependency plotter for your Hex Package -
passbook
Elixir library to create Apple Wallet (.pkpass) files -
exfcm
ExFCM is a simple wrapper around Firebase Cloud Messaging -
growl
Simple wrapper for growl, the notification system for OSX
Static code analysis for 29 languages.
Do you think we are missing an alternative of ecto_autoslug_field or a related project?
README
EctoAutoslugField
ecto_autoslug_field
is a reusable Ecto
library which can automatically create slugs from other fields. We use slugger
as a default slug-engine.
We only depend on the ecto
package (we do not deal with ecto_sql
at all).
We support ecto >= 2.1 and ecto < 4
!
See this blog post for more information.
Installation
def deps do
[
{:ecto_autoslug_field, "~> 2.0"}
]
end
Options
There are several options to configure.
Required:
:to
- represents the slug field name where to save value to
Optional:
:from
- represents the source fields from which to build slug, if this option is not set you have to overrideget_sources/2
function:always_change
- if this option is set slug will be recreated from the given sources each timemaybe_generate_slug
function is called
Functions
get_sources/2
- this function is used to get sources for the slug, docs.build_slug/2
- this function is a place to modify the result slug, docs.
Examples
The simplest example:
defmodule EctoSlugs.Blog.Article.TitleSlug do
use EctoAutoslugField.Slug, from: :title, to: :slug
end
defmodule EctoSlugs.Blog.Article do
use Ecto.Schema
import Ecto.Changeset
alias EctoSlugs.Blog.Article
alias EctoSlugs.Blog.Article.TitleSlug
schema "blog_articles" do
field :breaking, :boolean, default: false
field :content, :string
field :title, :string
field :slug, TitleSlug.Type
timestamps()
end
def changeset(%Article{} = article, attrs) do
article
|> cast(attrs, [:title, :content, :breaking])
|> validate_required([:title, :content])
|> unique_constraint(:title)
|> TitleSlug.maybe_generate_slug
|> TitleSlug.unique_constraint
end
end
See this tutorial for some more examples.
Changelog
See CHANGELOG.md.
License
MIT. Please see LICENSE for licensing details.
*Note that all licence references and agreements mentioned in the ecto_autoslug_field README section above
are relevant to that project's source code only.