joefiorini/roar-rails — comment on commit 0ab292cb7a5747767532c7e144b62079cf993d21
File:  line 0
By joefiorini:

I don't think Rails provides a very elegant way to solve this problem out of the box. The best thing that comes to mind immediately is to provide some love for decent_exposure (https://github.com/voxdolo/decent_exposure) users where exposed objects are automatically hydrated from whatever content type is being sent to the request. I'd love to see this support since, AFAIC it is the right way™ to expose objects to views anyway. We could isolate it in such a way that decent_exposure users would __have__ to require it (like `require 'roar/rails/exposure'` or something). The next best solution I can think of is to provide a before filter or Rack middleware, neither of which feel right to me. I'm certainly open to any other ideas, but.