Future features commented out

This commit is contained in:
Christoph Haas 2020-08-21 19:11:03 +02:00
parent 13d3517935
commit cfe6790179

View file

@ -57,13 +57,14 @@ class Screenshot < ApplicationRecord
end end
end end
def uploader # Future use…
if self.user # def uploader
self.user.name # if self.user
else # self.user.name
'Anonymous' # else
end # 'Anonymous'
end # end
# end
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema # Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
# def image_url(size) # def image_url(size)
@ -110,9 +111,9 @@ class Screenshot < ApplicationRecord
self.order(updated_at: :desc).where(approved: true).first self.order(updated_at: :desc).where(approved: true).first
end end
def self.approved # def self.approved
self.find_by(approved: true) # self.find_by(approved: true)
end # end
# Check whether the user has administrative permissions # Check whether the user has administrative permissions
def can_admin? def can_admin?