mix coh.gen.controllers (Coherence v0.8.0)

Generate Coherence controllers.

Use this task to generate the Coherence controllers when you what to customize the controllers' behavior.

Examples

# Install all the controllers for the coherence opts
# defined in your `config/config.exs` file
mix coh.gen.controllers

Once the controllers have been generated, you must update your router.ex file to properly scope the generated controller(s).

For example:

# lib/my_app_web
def MyAppWeb.Router do
  # ...

  scope "/", MyAppWeb do
    pipe_through :browser
    coherence_routes()
  end
  scope "/", MyAppWeb do
    pipe_through :protected
    coherence_routes :protected
  end
  # ...
end

Options

  • --web-path override the web path
  • --no-confirm silently overwrite files

Summary

Functions

Link to this function

copy_from(apps, source_dir, target_dir, binding, mapping, config)

Link to this function

do_default_opts(config, opts)

Callback implementation for Mix.Task.run/1.