diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 11:25:23 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 11:25:23 -0400 |
commit | 0d6f7a3bfbf4c87510a1bcf967b618f98e149d49 (patch) | |
tree | e3cd7d5329bd3c04a2fbfc766db34766fab12bc3 /app/models/alert.rb | |
parent | 8aefe73872571ac54738bde71d4da5611659a0cc (diff) |
clean up permission system
Diffstat (limited to 'app/models/alert.rb')
-rw-r--r-- | app/models/alert.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/alert.rb b/app/models/alert.rb index 9876711..e8a4cf2 100644 --- a/app/models/alert.rb +++ b/app/models/alert.rb @@ -1,3 +1,7 @@ class Alert < ActiveRecord::Base belongs_to :author, class_name: "User" + + def owned_by?(user) + self.author == user + end end |