diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-08-18 17:42:59 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-08-18 10:42:59 +0200 |
commit | 2edfdab6e6d70598a19d59f8a2f47ecae8add243 (patch) | |
tree | ad6904cb365f3e7b875a9cde5417386834627c00 /app | |
parent | 4edf9d849f5241aed42042577c889549a5b6beaa (diff) |
Don't send Link header when don't know prev and next links (#4633)
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/base_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 6ede63c79..7cfe8fe71 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -43,7 +43,7 @@ class Api::BaseController < ApplicationController links = [] links << [next_path, [%w(rel next)]] if next_path links << [prev_path, [%w(rel prev)]] if prev_path - response.headers['Link'] = LinkHeader.new(links) + response.headers['Link'] = LinkHeader.new(links) unless links.empty? end def limit_param(default_limit) |