Skip to content

travisjeffery/phoenix_ecto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A project that integrates Phoenix with Ecto, implementing all relevant protocols.

Usage

You can use phoenix_ecto in your projects in two steps:

  1. Add it to your mix.exs dependencies:

    def deps do
      [{:phoenix_ecto, "~> 2.0"}]
    end
  2. List it as your application dependency:

    def application do
      [applications: [:logger, :phoenix_ecto]]
    end

Details

This project:

  • Implements the Phoenix.HTML.FormData protocol for Ecto.Changeset
  • Implements the Phoenix.HTML.Safe protocol for Decimal, Ecto.Date, Ecto.Time and Ecto.DateTime
  • Implements the Poison.Encoder protocol for Ecto.Changeset (it renders its errors as JSON), Decimal, Ecto.Date, Ecto.Time and Ecto.DateTime
  • Implements the Plug.Exception protocol for the relevant Ecto exceptions

License

Same license as Phoenix.

About

Phoenix and Ecto integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%