Added "uploader" and "status" methods for Screenshot class

This commit is contained in:
Christoph Haas 2015-01-04 16:57:35 +01:00
parent 095ec7813a
commit 9877b25267

View file

@ -22,9 +22,24 @@ class Screenshot < ActiveRecord::Base
end
end
def uploader
# TODO: Implement the ownership of images
"Anonymous"
end
def status
text = ''
# Completes the sentence: "This image…"
if self.approved
text <<'is public'
else
text <<'has to be moderated before being publicly visible'
end
if self.markedfordelete
text <<' (and was requested to be removed)'
end
text
end
end