config/routes.rb in webhookr-0.0.2 vs config/routes.rb in webhookr-0.1.0
- old
+ new
@@ -1,4 +1,10 @@
Webhookr::Engine.routes.draw do
- get "/events/:service_id(/:security_token)" => "events#show", :as => "events"
- post "/events/:service_id(/:security_token)" => "events#create", :as => "events"
+ get "/events/:service_id(/:security_token)" => "events#show",
+ :as => "events",
+ :defaults => { :format => 'json' },
+ :constraints => { :format => 'json' }
+ post "/events/:service_id(/:security_token)" => "events#create",
+ :as => "new_event",
+ :defaults => { :format => 'json' },
+ :constraints => { :format => 'json' }
end