I hereby claim:
- I am cjbell on github.
- I am cjbell (https://keybase.io/cjbell) on keybase.
- I have a public key ASByIAdUbSnPWd2v7tOLX7dqM8v6XCcQxGY3Hfb5wTcL7Ao
To claim this, I am signing this object:
# Upload gems | |
gem "carrierwave" | |
gem "mini_magick", "~> 3.3" | |
gem "fog", "~> 1.3.1" |
defmodule Monitoring.Decorator do | |
@moduledoc """ | |
`Decorator` functions for doing monitoring. | |
""" | |
use Decorator.Define, [measure: 0, measure: 1] | |
alias Monitoring.Statix | |
require Logger |
# Usage in a controller | |
plug :load_and_authorize, [ | |
params: "account_id", | |
loader: &Accounts.get_account/1, | |
policy: AccountPolicy, | |
assign: :account | |
] when action in [:index] | |
# The plugs themselves |
I hereby claim:
To claim this, I am signing this object:
defmodule MyApp.PostController do | |
use MyApp.Web, :controller | |
import MyApp.Controllers.Helpers # this will bring in all of the helper methods into this controller | |
end |
defmodule MyApp.Web do | |
# ... Other lines removed for brevity | |
def controller do | |
quote do | |
use Phoenix.Controller | |
alias MyApp.Repo | |
import Ecto.Model | |
import Ecto.Query, only: [from: 2] |
defmodule MyApp.Controllers.Helpers do | |
import Plug.Conn | |
import Phoenix.Controller | |
def render_blank(conn) do | |
conn | |
|> send_resp(204, "") | |
end | |
def render_error(conn, status, opts) do |
defmodule Shop.Order do | |
use Shop.Web, :model | |
schema "orders" do | |
field :email, :string | |
has_one :address, Shop.Address | |
timestamps | |
end | |
{ | |
"directory": "vendor/assets/components" | |
} |
@function grid-calc($n, $g: 12) { | |
@return ($n / $g) * 100%; | |
} | |
// 12 column grid | |
@for $i from 1 through 12 { | |
%grid-#{$i}-of-12 { width: grid-calc($i); } | |
} |