<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  File: README
  
    &mdash; Documentation by YARD 0.9.9
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  pathId = "README";
  relpath = '';
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="_index.html">Index</a> &raquo; 
    <span class="title">File: README</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><div id='filecontents'><h3>JsonapiCompliable</h3>

<p><a href="https://travis-ci.org/jsonapi-suite/jsonapi_compliable"><img src="https://travis-ci.org/jsonapi-suite/jsonapi_compliable.svg?branch=master" alt="Build Status"></a></p>

<p><a href="https://jsonapi-suite.github.io/jsonapi_suite">JSONAPI Suite Website</a></p>

<p><a href="https://jsonapi-suite.github.io/jsonapi_compliable">Documentation</a></p>

<p>Supported Rails versions: &gt;= 4.1</p>

<h3>Upgrading to 0.11.x</h3>

<p>Due to a backwards-incompatibility introduced in the underlying
<a href="http://jsonapi-rb.org">jsonapi-rb</a> gem, specifying custom serializers
now works slightly differently.</p>

<p>Before:</p>

<pre class="code ruby"><code class="ruby"><span class='comment'># app/serializers/serializable_post.rb
</span>
<span class='id identifier rubyid_has_many'>has_many</span> <span class='symbol'>:comments</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='const'>SerializableSpecialComment</span>
</code></pre>

<p>and/or</p>

<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render_jsonapi'>render_jsonapi</span><span class='lparen'>(</span><span class='id identifier rubyid_post'>post</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='const'>SerializableSpecialPost</span><span class='rparen'>)</span>
</code></pre>

<p>This is now all handled at the controller level:</p>

<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render_jsonapi'>render_jsonapi</span><span class='lparen'>(</span><span class='id identifier rubyid_post'>post</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='lbrace'>{</span>
  <span class='label'>Post:</span> <span class='const'>SerializableSpecialPost</span><span class='comma'>,</span>
  <span class='label'>Comment:</span> <span class='const'>SerializableSpecialComment</span>
<span class='rbrace'>}</span><span class='rparen'>)</span>
</code></pre>

<h3>Upgrading to 0.10</h3>

<p><code>sideload_whitelist</code> has been moved from the resource to the controller:</p>

<pre class="code diff"><code class="diff">class PostsController &lt; ApplicationController
  jsonapi resource: PostResource do
-    sideload_whitelist({ index: [:foo] })
-  end
+  sideload_whitelist({ index: [:foo] })
end

# NEW
</code></pre>

<h3>Running tests</h3>

<p>We support Rails &gt;= 4.1. To do so, we use the <a href="https://github.com/thoughtbot/appraisal">appraisal</a> gem. So, run:</p>

<pre class="code bash"><code class="bash">$ bin/appraisal rails-4 bin/rspec
$ bin/appraisal rails-5 bin/rspec
</code></pre>

<p>Or run tests for all versions:</p>

<pre class="code bash"><code class="bash">$ bin/appraisal bin/rspec
</code></pre>

<h3>Generating the Documentation</h3>

<pre class="code bash"><code class="bash">$ yard doc
$ yard server
</code></pre>
</div></div>

      <div id="footer">
  Generated on Mon May  7 09:24:11 2018 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.9 (ruby-2.3.0).
</div>

    </div>
  </body>
</html>