From 05fbf7c01c7d92efc08d603f9970b688a5ec0abe Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 4 Apr 2015 17:44:52 -0700 Subject: Adding href field to json. --- app/views/downloads/index.json.jbuilder | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views/downloads/index.json.jbuilder') diff --git a/app/views/downloads/index.json.jbuilder b/app/views/downloads/index.json.jbuilder index 9933fd9..09c6faa 100644 --- a/app/views/downloads/index.json.jbuilder +++ b/app/views/downloads/index.json.jbuilder @@ -1,3 +1,4 @@ json.array!(@downloads) do |download| json.extract! download, :id, :name, :filename, :type, :description, :hits + json.href request.base_url + download_path(download.filename) end -- cgit v1.2.3