Skip to content

Commit

Permalink
fix: leverage ruby-2.7 parameter forwarding (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
belt committed Mar 18, 2024
1 parent e1dd811 commit ae09a46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fix: true
parallel: true
ruby_version: 2.4
ruby_version: 2.7

ignore:
- 'vendor/**/*'
Expand Down
2 changes: 1 addition & 1 deletion graphiti.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.6"
spec.required_ruby_version = ">= 2.7"

spec.add_dependency "jsonapi-serializable", "~> 0.3.0"
spec.add_dependency "jsonapi-renderer", "~> 0.2", ">= 0.2.2"
Expand Down
4 changes: 2 additions & 2 deletions lib/graphiti/serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def as_jsonapi(kwargs = {})
end

# Allow access to resource methods
def method_missing(id, *args, &blk)
def method_missing(id, ...)
if @resource.respond_to?(id, true)
@resource.send(id, *args, &blk)
@resource.send(id, ...)
else
super
end
Expand Down

0 comments on commit ae09a46

Please sign in to comment.