From fdc17bea58f210f62ac0d9e836b68e84c6dbd15c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 15 Nov 2016 16:56:29 +0100 Subject: Fix rubocop issues, introduce usage of frozen literal to improve performance --- app/controllers/accounts_controller.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/controllers/accounts_controller.rb') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index b16938845..5d2f4eee0 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AccountsController < ApplicationController layout 'public' @@ -41,10 +43,7 @@ class AccountsController < ApplicationController end def set_link_headers - response.headers['Link'] = LinkHeader.new([ - [webfinger_account_url, [['rel', 'lrdd'], ['type', 'application/xrd+xml']]], - [account_url(@account, format: 'atom'), [['rel', 'alternate'], ['type', 'application/atom+xml']]] - ]) + response.headers['Link'] = LinkHeader.new([[webfinger_account_url, [%w(rel lrdd), %w(type application/xrd+xml)]], [account_url(@account, format: 'atom'), [%w(rel alternate), %w(type application/atom+xml)]]]) end def webfinger_account_url -- cgit