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. --- Gemfile | 2 ++ app/views/downloads/index.json.jbuilder | 1 + 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index d42396b..04b6250 100644 --- a/Gemfile +++ b/Gemfile @@ -32,6 +32,8 @@ gem 'sdoc', '~> 0.4.0', group: :doc # Use Capistrano for deployment # gem 'capistrano-rails', group: :development +gem 'mysql2', group: :production + gem 'aws-sdk' gem 'rack-jsonp-middleware', :require => 'rack/jsonp' 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