Show newest screenshots first
This commit is contained in:
parent
9db16ab357
commit
e5ceab72a9
1 changed files with 2 additions and 2 deletions
|
|
@ -8,11 +8,11 @@ module PackagesHelper
|
|||
def screenshots_visible_to_user(package)
|
||||
if user_signed_in?
|
||||
# User is an admin
|
||||
package.screenshots
|
||||
package.screenshots.order('created_at DESC')
|
||||
else
|
||||
package.screenshots.where(
|
||||
"approved=true OR uploaderhash=?", session[:token]
|
||||
)
|
||||
).order('created_at DESC')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue