diff --git a/lib/jsonapi/routing_ext.rb b/lib/jsonapi/routing_ext.rb index 5aae3537..13ff8a86 100644 --- a/lib/jsonapi/routing_ext.rb +++ b/lib/jsonapi/routing_ext.rb @@ -44,7 +44,7 @@ def jsonapi_resource(*resources, &_block) options[:except] << :destroy unless options[:except].include?(:destroy) || options[:except].include?('destroy') end - resource @resource_type, options do + resource @resource_type, **options do # :nocov: if @scope.respond_to? :[]= # Rails 4 @@ -57,7 +57,7 @@ def jsonapi_resource(*resources, &_block) end else # Rails 5 - jsonapi_resource_scope(SingletonResource.new(@resource_type, api_only?, @scope[:shallow], options), @resource_type) do + jsonapi_resource_scope(SingletonResource.new(@resource_type, api_only?, @scope[:shallow], **options), @resource_type) do if block_given? yield else @@ -119,7 +119,7 @@ def jsonapi_resources(*resources, &_block) options[:except] << :destroy unless options[:except].include?(:destroy) || options[:except].include?('destroy') end - resources @resource_type, options do + resources @resource_type, **options do # :nocov: if @scope.respond_to? :[]= # Rails 4 @@ -131,7 +131,7 @@ def jsonapi_resources(*resources, &_block) end else # Rails 5 - jsonapi_resource_scope(Resource.new(@resource_type, api_only?, @scope[:shallow], options), @resource_type) do + jsonapi_resource_scope(Resource.new(@resource_type, api_only?, @scope[:shallow], **options), @resource_type) do if block_given? yield else diff --git a/test/test_helper.rb b/test/test_helper.rb index 30d439dd..3a59b280 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,5 @@ require 'simplecov' +require 'logger' require 'database_cleaner' # To run tests with coverage: