/json/packages and /json/screenshots implemented
This commit is contained in:
parent
b3d0b2dc06
commit
a90bb51b38
4 changed files with 25 additions and 0 deletions
|
|
@ -1,14 +1,20 @@
|
|||
class JsonController < ApplicationController
|
||||
# JSON information on a single package
|
||||
def package
|
||||
@p = Package.find_by_name! params[:name]
|
||||
end
|
||||
|
||||
# JSON information on all packages
|
||||
def packages
|
||||
@p = Package.all
|
||||
end
|
||||
|
||||
# JSON information on all screenshots
|
||||
def screenshots
|
||||
@s = Screenshot.includes(:package)
|
||||
end
|
||||
|
||||
# JSON list of packages that do not have screenshots
|
||||
def packages_without_screenshots
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue