Adds rails api with example route and test.

@azevedo-252 what do you think?
Stubbing here would mean that I'm aware of the method being called on the model inside the test. I don't really like that.