about summary refs log tree commit diff
path: root/app/models/follow.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/follow.rb')
-rw-r--r--app/models/follow.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/follow.rb b/app/models/follow.rb
new file mode 100644
index 000000000..eec01b9ba
--- /dev/null
+++ b/app/models/follow.rb
@@ -0,0 +1,8 @@
+class Follow < ActiveRecord::Base
+  belongs_to :account
+  belongs_to :target_account, class_name: 'Account'
+
+  after_create do
+    self.account.stream_entries.create!(activity: self)
+  end
+end