Closed timuckun closed 11 years ago
Some people have started looking into using the DSL with Rails but I haven't personally. An easy way would be to use wd_sinatra
https://github.com/mattetti/wd-sinatra and to mount your app inside Rails. It would also have for benefit to let you easily extract it later on if needs be.
Thanks for the quick reply.
Looking at the rails example app on github the author seems to be using it only for documentation. I think I might start with that approach.
Thanks again.
BTW.
Is there a way to specify multiple actions /get /get/:id /post etc...
are you asking if a specific endpoint can have multiple urls? Each service can only have one url endpoint, however, an endpoint can internally forward to another one.
No what I meant was if there is a GET and a POST to the same URL but the functionality is different for the two methods.
absolutely, these would be two different endpoints (2 different files), but the service verb would be different.
Great Thanks.
BTW I was able to wire it up to rails but only as a documentation engine. I think that its very useful for this purpose.
Cool, I really should take the time to look into how that's done, document it and show how to use the param verification as a before filter in Rails.
Is there a documentation anywhere on how to use this rails? I see a sample app on github but I don't see how the API is being routed at all. How do I specify the routes for the API?