re: RuboCop - get rid of redundant curly braces around a hash parameter

This commit is contained in:
Alexey Dubovskoy
2016-06-20 21:00:06 +01:00
parent 024b2d51d3
commit 13015680a7
12 changed files with 32 additions and 53 deletions

View File

@@ -5,17 +5,17 @@ module ActionController
class AdapterSelectorTest < ActionController::TestCase
class AdapterSelectorTestController < ActionController::Base
def render_using_default_adapter
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
@profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
render json: @profile
end
def render_using_adapter_override
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
@profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
render json: @profile, adapter: :json_api
end
def render_skipping_adapter
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
@profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
render json: @profile, adapter: false
end
end

View File

@@ -14,9 +14,9 @@ module ActionController
class PaginationTestController < ActionController::Base
def setup
@array = [
Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }),
Profile.new({ name: 'Name 2', description: 'Description 2', comments: 'Comments 2' }),
Profile.new({ name: 'Name 3', description: 'Description 3', comments: 'Comments 3' })
Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1'),
Profile.new(name: 'Name 2', description: 'Description 2', comments: 'Comments 2'),
Profile.new(name: 'Name 3', description: 'Description 3', comments: 'Comments 3')
]
end