2
votes
1answer
119 views

Rails 4.0 api_key implementation

I'll be brief and let the code speak for itself. I need some very harsh, honest, blunt feedback on this code. I am new to Rails - don't hold back. I have a concept of the user having many API keys, ...
2
votes
1answer
126 views

How can I refactor Api::SessionsController?

I have session controller for mobile devices. I would like to refactor it a little, for example because my session controller is sub class of ...
4
votes
2answers
5k views

RSpec integration tests for a simple Rails API

The Model is simple. A Player class with three attributes: first_name, last_name, and team_id. I'm just trying to get a handle on TDD for what will expand into a much more robust API. Below is my ...
3
votes
1answer
322 views

Protecting certain model attributes from being exposed in an API

There can be a business or security requirement that certain fields on a model should never be exposed in an API. One approach to this is to tell the developers not to ever put the field in the API ...