Showing number of users' uploaded screenshots at the top
This commit is contained in:
parent
82fb26efad
commit
bbccbfcc20
3 changed files with 23 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue