summaryrefslogtreecommitdiff
path: root/app/models/alert.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/alert.rb')
-rw-r--r--app/models/alert.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/alert.rb b/app/models/alert.rb
index 0516355..e8a4cf2 100644
--- a/app/models/alert.rb
+++ b/app/models/alert.rb
@@ -1,3 +1,7 @@
class Alert < ActiveRecord::Base
- belongs_to :author
+ belongs_to :author, class_name: "User"
+
+ def owned_by?(user)
+ self.author == user
+ end
end