These are chat archives for dry-rb/chat

17th
Feb 2018
Hamza Khan-Cheema
@hamzakc
Feb 17 2018 08:07

Hi.
Just a quick question, can anyone think of a better way of doing this:

 r.get do
   r.resolve "causes.operations.index" do |index|
     results = index.call
     results.mapper.model.collection_to_json_api(results.to_a)
   end
 end

I am trying to return a json_api representation of a collection

Hamza Khan-Cheema
@hamzakc
Feb 17 2018 17:48
guess not :)