OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
t#30143:au and ar change
[pettanr/pettanr.git]
/
app
/
models
/
artist.rb
diff --git
a/app/models/artist.rb
b/app/models/artist.rb
index
419e965
..
bfd9b76
100644
(file)
--- a/
app/models/artist.rb
+++ b/
app/models/artist.rb
@@
-17,8
+17,13
@@
class Artist < ActiveRecord::Base
end
def own? au
- return false unless au.is_a?(Author)
- self.author_id == au.id
+ if au.is_a?(Author)
+ self.author_id == au.id
+ elsif au.is_a?(Artist)
+ self.id == au.id
+ else
+ false
+ end
end
def visible? au