I am new to elixir and was going through sample chat application written in it using phoenix framework. I am not able to understand meaning of this line
channel "rooms:*", Chat.RoomChannel
I searched online for this type of syntax but could not got the answer I was looking for. I know that Chat.RoomChannel
is a module and channel
follows a string which identifies type of room under consideration
I want to know how that syntax works
channel("rooms:*", Chat.RoomChannel)
which may look more familiar to you. The parens are optional. – Chris Martin