Yet another typo regarding the usage of URL creation

This commit is contained in:
Christoph Haas 2016-07-19 21:03:17 +02:00
parent 59644078a3
commit 85b9f1014f
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
json.cache! ['json_packages'], expires_in: 1.hour do
json.packages @p do |p|
json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description
json.url url_for(p, protocol: 'https')
json.url package_url(p.name, protocol: 'https')
end
end

View file

@ -3,7 +3,7 @@ json.cache! ['json_screenshots'], expires_in: 1.hour do
p = s.package
json.extract! s, :version
json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description
json.url url_for(p, protocol: 'https')
json.url package_url(p.name, protocol: 'https')
json.small_image_url "https://#{request.host_with_port}#{s.image.url(:thumb, timestamp: false)}"
json.large_image_url "https://#{request.host_with_port}#{s.image.url(:large, timestamp: false)}"
end