Showing number of users' uploaded screenshots at the top

This commit is contained in:
Christoph Haas 2017-01-31 22:44:11 +01:00
parent 82fb26efad
commit bbccbfcc20
3 changed files with 23 additions and 0 deletions

View file

@ -5,4 +5,16 @@ class ApplicationController < ActionController::Base
# Do not mention passwords in the log file
# filter_parameter_logging :password
before_filter :get_current_users_screenshots
# Query for packages that were uploaded by the current user.
# As AAA is not yet implemented it means looking for uploads
# that correspond to the user's cookie token.
def get_current_users_screenshots
if session[:token]
@current_users_screenshots = Screenshot.uploaded_by(session[:token])
end
end
end