mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
re: RuboCop - get rid of redundant curly braces around a hash parameter
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user