Coherence v0.5.2 mix coh.gen.controllers

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

Link to this section Summary

Functions

A task needs to implement run which receives a list of command line args

Link to this section Functions

Link to this function copy_from(apps, source_dir, target_dir, binding, mapping, config)
Link to this function do_default_opts(config, opts)

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.