Skip to content

Commit 47d356c

Browse files
fix: Stringify path if Rails version > 7 (#107)
1 parent e5bbc92 commit 47d356c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/graphiti/rails/railtie.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ def configure_endpoint_lookup
131131
end
132132

133133
route = begin
134+
if Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new("7.0.0")
135+
path = path.to_s
136+
end
134137
::Rails.application.routes.recognize_path(path, method: method)
135-
rescue
138+
rescue => e
136139
nil
137140
end
138141
"#{route[:controller]}_controller".classify.safe_constantize if route

0 commit comments

Comments
 (0)