title: Rails ActiveRecord relation to JSON
body: <p>I'm using Rails to query data and put it into a hash like so...</p>
  
  <pre><code>class AssignmentsController &lt; ApplicationController
    respond_to :json
  
    def index
      student = Student.find(current_user.student_id)
      @assignments = Hash.new
      @assignments["individual"] = Assignment.where(:student_id =&gt; student.id)
  
      unless student.group_lesson_ids.nil?
        student.group_lesson_ids.each do |g|
          group_lesson = GroupLesson.find(g)
          @assignments[group_lesson.name] = Assignment.where(:group_lesson_id =&gt; g)
        end
      end
    end
  
  end
  </code></pre>
  
  <p>Then I want Rabl to turn this into JSON to be used by a Marionette app. </p>
  
  <p>Here's the Rabl file</p>
  
  <pre><code>object @assignments
  attributes :id, :title, :student_id, :assigned
  </code></pre>
  
  <p>But when I inspect the JSON in the browser, it just shows me the ActiveRecord relation.</p>
  
  <pre><code>{
  
      "#&lt;ActiveRecord::Relation::ActiveRecord_Relation_Assignment:0x007fa2956b43a8&gt;": [
          { },
          { },
          { }
      ]
  
  }
  </code></pre>
  
  <p>I understand this is because of the concept of lazy loading, but what should I do in this situation to make the JSON available to Marionette?</p>