4 ms·
Agree-- Even if it's possible I always feel dirty to do that kind of "magic", and always prefer this way: def handle_event(save, params, socket) do s
by wut42 5y ago
Agree-- Even if it's possible I always feel dirty to do that kind of "magic", and always prefer this way:
def handle_event(save, params, socket) do
socket = socket
|> put_flash(:info, "It worked!")
|> redirect(to: "...")
{:noreply, socket}
end
I feel like it's more readable this way.