In the previous article, we have implemented authentication solution. But we still have some spots to cover. Our users still can access every page even though they are not logged in. Today we will introduce some improvements in our authentication solution and do it by using the Plugs. Let’s get started. What is a Plug? Plugs are some sort of layers in a Phoenix application. Which can be injected i
defmodule OnDefinition do def on_definition(env, _kind, _name, _args, _guards, _body) do Module.put_attribute(env.module, :my_func_attr, nil) end end defmodule Foo do # Foo モジュール内で関数を定義したタイミングで呼ばれるフックを指定する。 @on_definition {OnDefinition, :on_definition} # これをモジュール定義の最初のほうで実行すると、 # 以降このモジュール内に出現した `@my_func_attr expr` が記録されていく。 # このモジュールのコンパイルフェーズ中に限り、 # `Module.get_attribute(Foo, :my_func_attr)` マク
TL;DR: The Elixir language is dynamically typed with lots of helpful documentation. It builds on Erlang and the Erlang VM. You can be up and running almost immediately. If your app compiles, it's already deployable. The Phoenix framework for Elixir apps is genuinely exciting to use. Let's build an easy-to-use application that manages upcoming events, built with the Phoenix Framework and authentica
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く