Last active
June 6, 2020 07:38
-
-
Save tslim/03b448215108e2f1bd06f1d9153e48fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle_action(params, _uri, socket) do | |
{:ok, apply_action(socket, socket.assigns.live_action, params)} | |
end | |
defp apply_action(socket, :index, _params) do | |
assign(socket, :page_title, "Index Page") | |
end | |
defp apply_action(socket, :show, _params) do | |
assign(socket, :page_title, "Show Page") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment