Skip to content

Instantly share code, notes, and snippets.

ialeke / app.js
Last active Apr 8, 2021
Using Phoenix Router and Vue Router
View app.js
// We need to import the CSS so that webpack will load it.
// The MiniCssExtractPlugin is used to separate it out into
// its own CSS file.
import "../css/app.scss";
// webpack automatically bundles all modules in your
// entry points. Those entry points can be configured
// in "webpack.config.js".
// Import deps with the dep name or local files with a relative path, for example:
ialeke / jason_encoder_example.ex
Last active Apr 8, 2021
Jason.Encoder ecto example, removing __meta__ and %Ecto.Association.NotLoaded{}
View jason_encoder_example.ex
defimpl Jason.Encoder, for: [Example.Module1, Example.Module2] do
def encode(value, opts) do
|> process_for_json
def remove_unloaded({_field, %Ecto.Association.NotLoaded{}}, accum), do: accum
ialeke / index.html
Created Mar 13, 2020
Vuetify Template
View index.html
<div id="app">
<v-app id="inspire">
<v-list dense>
<template v-for="item in items">