Companion repository for Phoenix LiveView Messenger app by Curiosum.dev.
To learn more, head on over to our blog:
Companion repository for Phoenix LiveView Messenger app by Curiosum.dev. Part 1: https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-1?utm_source=github&utm_medium=social, Part 2: https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-2?utm_source=github&utm_medium=social, Part 3: https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-3?utm_source=github&utm_medium=social, Part 4: https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-4?utm_source=github&utm_medium=social
Home Page: https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-1
Companion repository for Phoenix LiveView Messenger app by Curiosum.dev.
To learn more, head on over to our blog:
First of all I want to say thanks for taking the time to write this series of Blog Posts :)
The blog post for part 3 doesn't mention that we need to add the plug assign_user.ex and to add to PageController the line:
plug CuriousMessengerWeb.AssignUser, preload: :conversations
Also the blog post mention that for conversation.ex we should add this code:
schema "chat_conversations" do
# ...
has_many :conversation_members, ConversationMember
has_many :conversations, through: [:conversation_members, :conversation]
end
But in instead the repo have this code:
# ....
has_many :conversation_members, ConversationMember, on_replace: :delete
has_many :users, through: [:conversation_members, :user]
Without this we get an exception:
[error] #PID<0.788.0> running CuriousMessengerWeb.Endpoint (connection #PID<0.786.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
** (Protocol.UndefinedError) protocol Enumerable not implemented for #Ecto.Association.NotLoaded<association :conversations is not loaded> of type Ecto.Association.NotLoaded (a struct). This protocol is implemented for the following type(s): Ecto.Adapters.SQL.Stream, Postgrex.Stream, DBConnection.PrepareStream, DBConnection.Stream, HashDict, Range, Stream, MapSet, Date.Range, GenEvent.Stream, HashSet, Map, List, File.Stream, Function, IO.Stream
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.