Skip to content

Instantly share code, notes, and snippets.

View nallwhy's full-sized avatar

Jinkyou Son nallwhy

View GitHub Profile
@nallwhy
nallwhy / server.exs
Created August 8, 2024 03:30
Error with embedded array attribute on create
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.exs
Last active August 8, 2024 03:30
Ash error with embedded array attribute
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.ex
Last active July 26, 2024 09:21
ash policy example
Mix.install(
[
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
{:phoenix, "~> 1.7.0"},
{:phoenix_live_view, "~> 0.20.0"},
{:ash, "3.2.6"},
{:ash_phoenix, "2.0.4"},
{:ash_state_machine, "0.2.5"},
{:simple_sat, "~> 0.1"}
@nallwhy
nallwhy / server.exs
Created June 19, 2024 01:48
manage_relationship treat create before destroy
Mix.install(
[
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
{:phoenix, "1.7.12"},
{:phoenix_live_view, "0.20.14"},
{:ash, "3.0.13"},
{:ash_phoenix, "2.0.4"}
],
config: [
@nallwhy
nallwhy / server.exs
Created April 30, 2024 08:07
embedded in union type
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.exs
Created April 30, 2024 01:04
union type not loaded
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.exs
Created April 29, 2024 08:21
error with not public union type
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server_ash.exs
Created April 17, 2024 07:25
inputs_for with union type not working with update action
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.exs
Created March 11, 2024 08:27
LiveView Form with phx-hook input example
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},
@nallwhy
nallwhy / server.exs
Last active March 5, 2024 23:50
AshPhoenix Form is not valid
Application.put_env(:sample, SamplePhoenix.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.7"},
{:jason, "~> 1.0"},