Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Pallen smpallen99

View GitHub Profile
@smpallen99
smpallen99 / upgrade.md
Last active Sep 9, 2018
Coherence 0.5.x to 0.6.0 Upgrade Instructions
View upgrade.md

Coherence 0.5.x to 0.6.0 Upgrade Instructions

Upgrade your generated Controllers

Coherence 0.6.0 introduces a new controller design that splits each controller into 2 files:

  • Coherence.xxxControllerBase contains all the functions previously found in Coherence.xxxController
    • The new functions are wrapped in a using macro, with one mandatory option. The schemas option specifies the name of your projects Schemas module.
    • All functions are overridable
    • All private functions have been made public to support overriding
  • Coherence.xxxController contains only a few lines, as shown by the following example:
View test.md

Heading

Here is some text just after the heading. It will be follow by one more paragraph that will then be followed by a list. This is to test the formatting which I will compare to github. This will tell me how it looks.

Here is the header line:

  • First List is here
  • Another bullet
  • one more for good measure
@smpallen99
smpallen99 / upgrade.md
Created Jun 1, 2017
Upgrade instructions for Talon v0.1.0
View upgrade.md

The following is required to manually upgrade a project to the stucture required for v0.1.0

@smpallen99
smpallen99 / upgrade.md
Created Jun 1, 2017
Upgrade instructions for Talon v0.1.0
View upgrade.md

The following is required to manually upgrade a project to the stucture required for v0.1.0

@smpallen99
smpallen99 / schema.ex
Created May 15, 2017
Example ExAdminRedux Ecto Schema Adapter
View schema.ex
defmodule ExAdmin.Schema.Adapters.Ecto do
@moduledoc """
Implements the ExAdmin.Scheam.Adapters behaviour.
Add support for Ecto in ExAdin.
"""
@behaviour ExAdmin.Schema.Adapters
@doc """
Retrieve the primay key of a query, schema module, or a schema struct.
@smpallen99
smpallen99 / resource.ex
Last active May 15, 2017
Example of ExAdminRedux resource file
View resource.ex
# ex_admin/lib/ex_admin/resource.ex
# Here is the prototype of the resoruce.ex library in ex_admin.
defmodule ExAdmin.Resource do
defmacro __using__(opts) do
schema = opts[:schema]
unless schema do
raise ":schema is required"
end
@smpallen99
smpallen99 / index.html.eex
Created May 15, 2017
Example of ExAdminRedux theme templates
View index.html.eex
/ web/templates/admin/material_bootstrap/generators/index.html.eex
/ Example of a the default theme resource index page. This is an template for the generator that
/ creates the the end view template. Creating a theme will be as simple as generating a new version
/ of these files and editing them to match your theme.
/ A second level of templates like this will be available per resource so you can customize the pages
/ for each resource.
.container-fluid
@smpallen99
smpallen99 / config.exs
Created May 15, 2017
ExAdminRedux Config Example
View config.exs
# Very similar to current ExAdmin config file
# This examples belows to a demo app called `NewAdmin`
use Mix.Config
# List of Resource Modules, on for each ExAdmin managed resource
config :ex_admin, resources: [
NewAdmin.ExAdmin.Country,
NewAdmin.ExAdmin.State,
NewAdmin.ExAdmin.User,
@smpallen99
smpallen99 / upgrade.md
Created Apr 25, 2017
Coherence 0.3.1 to 0.4.0 Upgrade Instructions
View upgrade.md

Coherence 0.3.1 to 0.4.0 Upgrade Instructions

Update your configuration

Two new manditory configuration keys are required

add:

config :coherence,
You can’t perform that action at this time.