diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-30 15:38:26 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-30 15:38:26 -0400 |
commit | 47bb545740937d50b72e0d1c420fcba4e64d6760 (patch) | |
tree | 886e361d01b1cdab7d3e8afed40eb76c6791ddfb /app/models/pm.rb | |
parent | f1b2a1f25b839237ff1791ffc4586bc466409874 (diff) |
Add #owned_by? to the models that didn't have it (when appropriate)
Diffstat (limited to 'app/models/pm.rb')
-rw-r--r-- | app/models/pm.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/pm.rb b/app/models/pm.rb index 8b06181..3d14149 100644 --- a/app/models/pm.rb +++ b/app/models/pm.rb @@ -7,6 +7,10 @@ class Pm < ActiveRecord::Base return current_user.name end + def owned_by?(user) + self.author == user + end + =begin def mailboxer_email(email) return current_user.email |