From 623b2b486f2d3215fe332f06d8f6f39946db2865 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 18 Nov 2019 22:41:57 -0500 Subject: [PATCH] forum has_many subscriptions --- lib/philomena/forums/forum.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/philomena/forums/forum.ex b/lib/philomena/forums/forum.ex index 5b2cddda..0c6a783c 100644 --- a/lib/philomena/forums/forum.ex +++ b/lib/philomena/forums/forum.ex @@ -4,11 +4,13 @@ defmodule Philomena.Forums.Forum do alias Philomena.Posts.Post alias Philomena.Topics.Topic + alias Philomena.Forums.Subscription @derive {Phoenix.Param, key: :short_name} schema "forums" do belongs_to :last_post, Post belongs_to :last_topic, Topic + has_many :subscriptions, Subscription field :name, :string field :short_name, :string