Replace long string with array and join (#795)

This commit is contained in:
Maksim Litvinov 2018-11-28 16:20:13 +02:00 committed by Ben Halpern
parent 1672098388
commit f2f889af77

View file

@ -12,7 +12,15 @@ module Api
def index
@articles = ArticleApiIndexService.new(params).get
set_surrogate_key_header "articles_api_#{params[:tag]}_#{params[:page]}_#{params[:userame]}_#{params[:signature]}_#{params[:state]}"
key_headers = [
"articles_api",
params[:tag],
params[:page],
params[:userame],
params[:signature],
params[:state],
]
set_surrogate_key_header key_headers.join('_')
end
def show