Skip to content

Commit

Permalink
Use percent array literals for large arrays of symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan-M committed Mar 26, 2018
1 parent b9aa296 commit 5b1af54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions test/dummy/app/controllers/overrides/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ def create
@resource.save

render json: {
data: @resource.as_json(except: [
:tokens, :created_at, :updated_at
]),
data: @resource.as_json(except: %i[tokens created_at updated_at]),
override_proof: OVERRIDE_PROOF
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ def validate_token
if @resource
render json: {
success: true,
data: @resource.as_json(except: [
:tokens, :created_at, :updated_at
]),
data: @resource.as_json(except: %i[tokens created_at updated_at]),
override_proof: OVERRIDE_PROOF
}
else
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ use Rack::Cors do
resource '*',
headers: :any,
expose: ['access-token', 'expiry', 'token-type', 'uid', 'client'],
methods: [:get, :post, :options, :delete, :put]
methods: %i[get post options delete put]
end
end

0 comments on commit 5b1af54

Please sign in to comment.