title: ActiveRecord to_json include association in :methods
body: <p>I am converting a User object to json via:</p>
  
  <pre><code>user.to_json :methods =&gt; :new_cookies
  </code></pre>
  
  <p>the new_cookies method is:</p>
  
  <pre><code>cookies.all :include =&gt; :fortune, :conditions =&gt; {:opened =&gt; false}
  </code></pre>
  
  <p>This embed the cookies inside the user json object, but I want fortune to be embedded inside the cookie object as well. I passed inside <code>:include =&gt; :fortune</code> but that doesn't that work.</p>
  
  <p>Is this possible?</p>
  
  <p>Models:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
      has_many :cookies
      has_many :fortunes, :through =&gt; :cookies
  
      def new_cookies
          cookies.all :include =&gt; :fortune, :conditions =&gt; {:opened =&gt; false}
      end
  end
  
  class Cookie &lt; ActiveRecord::Base
      belongs_to :user
      belongs_to :fortune
  end
  
  class Fortune &lt; ActiveRecord::Base
      serialize :rstatuses
      serialize :genders 
  
      has_many :cookies
      has_many :users, :through =&gt; :cookies
  end
  </code></pre>