Adds rails api with example route and test.

@azevedo-252 what do you think?
well, it's only going to be included in tests with the type 'require', what do you suggest?