Undefined method `propfind 'for ActionDispatch :: Routing :: Mapper
I am trying to implement git push
rails in my application and send a PROPFIND request which does not seem to validate rails. When I try:
git click http: // localhost: 3000 / satellite / .git
this gives me:
Launched PROPFIND "/satellite/.git/" for 127.0.0.1 at 2015-06-08 19:20:38 +0530
ActionController :: RoutingError (no links to route [PROPFIND] "/satellite/.git")
however git clone http://localhost:3000/satellite/.git
works just fine. (i.e. the repo exists).
If I try to add propfind to my routes.rb file it gives me:
undefined method `propfind 'for ActionDispatch :: Routing :: Mapper
I found this: https://rails.lighthouseapp.com/projects/8994/tickets/5895-allow-mounting-of-rack-apps-that-deal-with-http-extensions
I think after this patch they allowed PROPFIND in ActionDispatch, and in the doc they mentioned propfind as an RFC3253 constant. Is there a way I can enable PROPFIND?
source to share
It looks like you need to add requests PROPFIND
to your routes via generic matches, ( see this test ), so the following should work for you:
resources :git_repos do
member do
match '.git' => :your_route, :via => :propfind
end
end
source to share