From 14d693e2c1c5355f47fe71409e3320ff2933020b Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 11 Nov 2019 12:44:29 -0500 Subject: [PATCH] implement attribution for topic --- lib/philomena/topics/attribution.ex | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/philomena/topics/attribution.ex diff --git a/lib/philomena/topics/attribution.ex b/lib/philomena/topics/attribution.ex new file mode 100644 index 00000000..171cd3a6 --- /dev/null +++ b/lib/philomena/topics/attribution.ex @@ -0,0 +1,9 @@ +defimpl Philomena.Attribution, for: Philomena.Topics.Topic do + def object_identifier(topic) do + to_string(topic.id) + end + + def best_user_identifier(topic) do + to_string(topic.user_id) + end +end \ No newline at end of file