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
work
[pettanr/pettanr.git]
/
app
/
models
/
original_picture.rb
diff --git
a/app/models/original_picture.rb
b/app/models/original_picture.rb
index
3004bb5
..
f29212c
100644
(file)
--- a/
app/models/original_picture.rb
+++ b/
app/models/original_picture.rb
@@
-53,7
+53,8
@@
class OriginalPicture < Pettanr::Content
end
def revision
- self.history.first.revision
+ head = self.history.first
+ head ? head.revision : 'unpublished'
end
def unpublished?