#Phoenix Generator A collection of boilerplate generators for the Phoenix Web Framework.

https://github.com/etufe/phoenix_generator

##Setup

defp deps do
  [{:postgrex, ">= 0.0.0"},
   {:ecto, github: "elixir-lang/ecto"},
   {:phoenix_generator, github: "etufe/phoenix_generator"}]
end

You should also update your applications list to include postgrex and ecto:

def application do
  [applications: [:postgrex, :ecto]]
end

Generators

run a generator: mix phoenix.gen.some_generator

get help and options: mix help phoenix.gen.some_generator

Putting it all together

Let's use the generators to create a simple notes app.

Caveats

defimpl Phoenix.HTML.Safe, for: Ecto.DateTime do
  def to_iodata(%Ecto.DateTime{day: day, hour: hour,
      min: min, month: month, sec: sec, year: year}) do
    "#{year}/#{month}/#{day} #{hour}:#{min}:#{sec}"
  end
end

Contributing

Feel free to make pull requests or create github issues. Ecto and Phoenix are both moving targets at the moment and I aim to keep these generators in sync with whatever is in master of those two projects.

##Todo