I’m building a XML API with the help of the Grape gem. What is the best way to building XML for API actions? Since Grape isn’t using standart rails controllers, i can’t use views/../xml.builder. What did you suggest? Maybe there are some best practices for building xml api?
I’m building a XML API with the help of the Grape gem. What is
Share
Sinece there are no any answers, i will answer my own question.
I ended up with modules where are i declare different kind of xml responses and include this modules into my Grape API. In API actions i just calling response methods from this modules. With this approach my code is clear and separated.