aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-02-04 09:22:25 -0500
committerAlec Warner <antarus@gentoo.org>2018-02-04 09:22:25 -0500
commit6d36e77b9c8464829e7fb6ca040e27445aadb876 (patch)
treebfec545b1d4a056ef5a5d29636d54484185d9885 /app
parentFix sidekiq initializer. (diff)
downloadpackages-6d36e77b9c8464829e7fb6ca040e27445aadb876.tar.gz
packages-6d36e77b9c8464829e7fb6ca040e27445aadb876.tar.bz2
packages-6d36e77b9c8464829e7fb6ca040e27445aadb876.zip
Fix find_all_by_package.
Originally designed as a replacement for find_all_by_parent, we don't need a custom function for it because Version.find_all_by(:package, name) works just as well.
Diffstat (limited to 'app')
-rw-r--r--app/models/package.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/package.rb b/app/models/package.rb
index dd63622..b6e86fe 100644
--- a/app/models/package.rb
+++ b/app/models/package.rb
@@ -44,7 +44,7 @@ class Package
end
def versions
- @versions ||= Version.find_all_by_package(name, sort: { sort_key: { order: 'asc' } })
+ @versions ||= Version.find_all_by(:package, name, sort: { sort_key: { order: 'asc' } })
end
def latest_version