List layout made less cluttered
This commit is contained in:
parent
969abda5da
commit
24a27e3a0e
2 changed files with 16 additions and 8 deletions
|
|
@ -26,6 +26,15 @@ class Package < ApplicationRecord
|
|||
# order('name ASC')
|
||||
# }
|
||||
|
||||
# Return the first paragraph of the long description.
|
||||
def long_description_first_paragraph
|
||||
if self.long_description
|
||||
self.long_description.split(/\n\.\n/).first
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
# Return a query of all packages that have screenshots
|
||||
def self.with_screenshots
|
||||
# Query for all packages who's ID appears in a screenshot's "package_id" field
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue