return approved screenshots only in public json. fixes #96
This commit is contained in:
parent
e2473ff511
commit
9d0009b129
3 changed files with 16 additions and 5 deletions
|
|
@ -71,6 +71,11 @@ class Package < ApplicationRecord
|
|||
screenshots.approved.to_a.sort { |x, y| version_compare(x.version, y.version) }
|
||||
end
|
||||
|
||||
# Return all approved screenshots for this package
|
||||
def approved_screenshots
|
||||
screenshots.approved
|
||||
end
|
||||
|
||||
# Return the newest screenshot that is not newer than the given version.
|
||||
# This algorithm collects all image
|
||||
# versions of a package and determines the (second) newest version.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue