Stuff
This commit is contained in:
parent
098afc1924
commit
193d44f89a
27 changed files with 331 additions and 707 deletions
|
|
@ -82,6 +82,11 @@ class Package < ApplicationRecord
|
|||
return sorted_screenshots.last
|
||||
end
|
||||
|
||||
# Return the part of the version up to the first - or +
|
||||
def upstream_version
|
||||
self.version.split(/[\-\+]/).first
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def version_compare(x,y)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class Screenshot < ApplicationRecord
|
|||
# Publish a screenshot from the moderation queue
|
||||
def approve_screenshot!
|
||||
|
||||
|
||||
|
||||
self.delete_reason = nil
|
||||
self.markedfordelete = false
|
||||
self.approved = true
|
||||
|
|
@ -164,4 +164,9 @@ class Screenshot < ApplicationRecord
|
|||
false
|
||||
end
|
||||
|
||||
# Return the part of the version up to the first - or +
|
||||
def upstream_version
|
||||
self.version.split(/[\-\+]/).first
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue