respond with location
Return the data in the format that ember needs.

Blog:

What is interesting here is that render json behaves
differently depending on some factor that I'm unaware of.

I'm pretty sure that render json: is *supposed* to wrap the
response with it's resource name (ie, ```
{"access_token": {"created_at":...}}
```
But I think Rails changed between this version of rails and
a previous version. Perhaps it is a bug? Or maybe I've missed
something in ember, although I doubt it.

What is messed up is just how long it took me to find this
error. Because embers magic wasn't being magical I had no
way of finding out *why* the response wasn't triggering the
automagical hooks. This is roughly the thought process in my
head:

"How do I access the object? I need to be able to verify that it
is getting the id. Hmm... this.get('content') I think solves that.
Ok, so let's console log that... Hmm... Nothing useable there.
Let me try this.get('content.id') that looks null. Hmm. Now what?"

Then I commenced figuring out how to step through JS (something I
haven't had to do in over a decade) so I could figure out what the
ember source was doing. Although I learned some stuff, the observer
patter doesn't lend itself well to debugging (since it listens for
state change, which when you are trying to figure out why it is
*not* happening is useless).

I finally fired up my forked version of ember_data_example and
stepped through the JS line by line. The only difference was that
the event hooks fired on ember_data_example, but not on cw.

I decided to try to make Rails the same across both, even though
the example one is 3.2.9 while mine is only 3.2.13 (theoretically
the difference should be negligable and the apis should be stable).

Of course the ember_data_example that was working subsequently
started 500'ing and 422'ing all over the console. So fine, the difference does matter and I reverted it. But if the difference is in the
Rails side of things then clearly I need to investigate the
difference in the response more carefully.

In retrospect, checking the response body should be at the top of the
priority list - and as I mentioned about, that is where the problem is
- but it shows just how hard it is to debug while learning a magical
framework, especially if your daily toolkit expands beyond
Ember + Rails. Trying to keep SciPy, Tornado, Rails, Sinatra, JS,
Ember, CSS, HTML, Nginx, MySQL, Riak, Mongo, Erb, OSX, Linux, OAuth,
XAuth, PDF Generation, Machine Learning, C++, SDL, C,
graph traversal, LSI, LDA, Webhooks, HTTP, TCP, UDP, spatial
indexes, security best practices, streaming, sockets, analytics, etc.
In my head all at once is hard enough, but then the libraries,
practices, and protocols keep changing!

It seems like the only way to be competent is to cut down,
on the diversity of the projects you work on, but that comes at two
heavy costs:

1. Sanity - ("If I build one more data dashboard in Python I'ma
peel this monster truck right of the slippy slide")

2. Marketability - "Mr. Smith, besides J2EE Sprig, what else can
you do?"

3. Loss of the joy of learning stuff for the first time.

I'm not saying I'm going to change what I'm doing. I'm just going to
change my default position from anger at why things are hard to debug
to acceptance that the territory of learning lots of different
technologies comes with the need to have harder than normal debugging
every now and then.

What I haven't changed my mind about is that JavaScript is
fundamentally an inferior language. But I'll leave that for another
post.
make verbose debugging toggable
transition to a different route after the access token is aquired
Add comments
since I want to stay logged in everywhere
provide access_token through id
update title
Yearrrr-ify it
log in the user \o/
Add application controller's update current user to access token
Add the ability to log out to the application controller
Create destroy by token