We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Daily reminder that you can implement Inspect protocol for your Ecto / Ash models and actually see something in the logs 🙃
defmodule Postline.Accounts.User do
# This is where the magic happens
@derive {Inspect, only: [:id, :email, :first_name, :last_name]}
use Ecto.Schema
schema "users" do
field :email, :string
field :first_name, :string
field :last_name, :string
field :avatar, :string
field :subscribed, :boolean, default: false
field :subscription, :string
field :role, :atom, default: :user
timestamps()
end
end
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.