Using Rails ActiveResource via OAuth2
Exposing Resources via a REST interface can be a nice way to split-off certain parts of a larger Rails application. To consume those, ActiveResource has been a nice way to go for quite some time now, and still is in my opinion even thought with Rails 4 it will move to its own gem and be no longer tied to Rails Core (good or bad?).
One hurdle left is that in some cases resources are, or should be protected. In this case working with OAuth2 for example is quite easy the only thing needed is setting a header.
The token obtained for example via Omniauth and then set in the Controller. So thats it now using the Resource works just as using an ActiveRecord Model.