Skip to content

Commit

Permalink
Version 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gjaldon committed Jul 5, 2019
1 parent 2440a00 commit d8aa876
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.3.1
- Fixed a bug where multiple function clauses of `cast` and `dump` were defined by `EctoEnum.Use`.
This error happens when defining string-backed enums, since multiple function clauses for the string
value is defined.

## 1.3.0
- Refactored internals to make it easier to support `use`ing feature and string-backed enums.
- Add `use`ing functionality so we can use `EctoEnum` or `EctoEnum.Postgres` to define Ecto Enums.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Note that we can also use string-backed enums by doing the following:
```elixir
defenum StatusEnum, registered: "registered", active: "active", inactive: "active", archived: "archived"
# short-cut way of using string-backed enums
defenum StatusEnum, ["registered", "active", "active", "archived"]
defenum StatusEnum, ["registered", "active", "inactive", "archived"]
```

Once defined, `EctoEnum` can be used like any other `Ecto.Type` by passing it to a field
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule EctoEnum.Mixfile do
use Mix.Project

@version "1.3.0"
@version "1.3.1"

def project do
[
Expand Down

0 comments on commit d8aa876

Please sign in to comment.