title: Rails: Passing API JSON Response to View, without Model
body: <p>Disclaimer: I'm doing something which may qualify for Code Smell of 2015 Award. Using rails 4.2, no javascript or anything like that. </p>
  
  <p>I have a form into which users input their data. With this data I call a third-party API which will remain nameless. :)</p>
  
  <p>I have no model, I'm not persisting anything. (Part of a larger app, not a one-pager.) Thus when faced with presenting the user with the response, I find myself stuck on how to render the data properly into a view. The response contains an array of hashes which I obviously intend to present the user.</p>
  
  <p>I render the form into widgets/new, etc, create and process the request, etc, but then what?</p>
  
  <p>I thought maybe I could make use of decorators to do my dirty work but not sure how to actually get the user off to the respective view. I don't care which view. Call it a widget_path.</p>
  
  <pre><code>WidgetsController &lt; ApplicationController
    def new
      render :new
    end      
  
    def create
      # preparing request        
      ...
      # data = response, each_serializer, WidgetSerializer, root: false
      # data = WidgetDecorator.new(render_serialized(response, WidgetSerializer))
      # @data = WidgetDecorator.new(JSON.parse(response))
      # redirect_to ??_path ... and take your @data with you
    end
  end
  </code></pre>
  
  <p>What do I do? </p>