grape icon indicating copy to clipboard operation
grape copied to clipboard

Grape route error

Open tabz24 opened this issue 9 years ago • 1 comments

I am trying to my file with the namespace and route param, but the namespace and the route params are adding twice. Mustermann::CompileError: can't use the same capture name twice: "/api/:version/users/:user_id/users/:user_id/activity(.:format)"

root.rb

module V3
  class Base < Grape::API
    namespace :users do
      route_param :user_id do
        mount V3::ActivityService
      end
    end
  end
end

Grape version 0.19.2

tabz24 avatar May 12 '17 10:05 tabz24

The problem was from my end. I was inheriting from Grape::API at the both the places, in my base class and in my root class where i mounted my base class

tabz24 avatar May 12 '17 10:05 tabz24