diff --git a/lib/trestle/resource.rb b/lib/trestle/resource.rb index bf9aa6c7..cd0c571b 100644 --- a/lib/trestle/resource.rb +++ b/lib/trestle/resource.rb @@ -133,9 +133,17 @@ def routes } Proc.new do - public_send(resource_method, resource_name, resource_options) do - admin.additional_routes.each do |block| - instance_exec(&block) + if Rails.version > "7.3" + public_send(resource_method, resource_name, **resource_options) do + admin.additional_routes.each do |block| + instance_exec(&block) + end + end + else + public_send(resource_method, resource_name, resource_options) do + admin.additional_routes.each do |block| + instance_exec(&block) + end end end end