mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Generating docs for version 0.10.0 at ref 7578a3c.
This commit is contained in:
parent
b49d396397
commit
dd0d9c6835
@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -339,7 +339,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -165,7 +165,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -120,7 +120,7 @@ subclassed to decorate a resource.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -126,7 +126,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1755,7 +1755,7 @@ below is true:</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -147,7 +147,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -239,7 +239,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -226,7 +226,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -239,7 +239,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -240,7 +240,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -239,7 +239,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -160,7 +160,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -583,7 +583,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -263,7 +263,7 @@ not provided)</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -488,7 +488,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -158,7 +158,7 @@ ActiveModel::Serializer class.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -488,7 +488,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -167,7 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -629,7 +629,7 @@ customize the cache key</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1291,7 +1291,7 @@ called with a non-nil value. rubocop:disable Style/ClassVars</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -163,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -703,7 +703,7 @@ the logic right here.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -387,7 +387,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -494,7 +494,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -405,7 +405,7 @@ block is evaluated in the context of the serializer.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -303,7 +303,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -167,7 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -167,7 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -246,7 +246,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -901,7 +901,7 @@ required unless caching is enabled.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -192,7 +192,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -390,7 +390,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -729,7 +729,7 @@ association by its reflection.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -163,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -187,7 +187,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -453,7 +453,7 @@ Style/AsciiComments TODO: implement!</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -878,7 +878,7 @@ so that registering 'ActiveModelSerializers::Adapter::Json' and
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -212,7 +212,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1073,7 +1073,7 @@ serialization_options(options).</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -320,7 +320,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -851,7 +851,7 @@ definition:</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1050,7 +1050,7 @@ value.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -462,7 +462,7 @@ parameter: A string indicating which query parameter caused the error</code></pr
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -356,7 +356,7 @@ meta</code></pre>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -466,7 +466,7 @@ meta</code></pre>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -292,7 +292,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -431,7 +431,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -287,7 +287,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -255,7 +255,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -208,7 +208,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -133,7 +133,7 @@ serialization and allow you to trigger logic. Available callbacks are:</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -216,7 +216,7 @@ it is as_json, to_json, or serializable_hash</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -262,7 +262,7 @@ that it is planned to go away.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -230,7 +230,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -180,7 +180,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -343,7 +343,7 @@ actionpack/lib/action_dispatch/http/parameters.rb</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -173,7 +173,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -524,7 +524,7 @@ deserialization in the JsonApi adapter.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -262,7 +262,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -177,7 +177,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -245,7 +245,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -240,7 +240,7 @@ rendered. Adapted from:</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -752,7 +752,7 @@ ActiveModel::Errors :nocov:</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -822,7 +822,7 @@ False when explicit adapter is falsy (nil or false)</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -559,7 +559,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:56 2016 by
|
Generated on Wed Jun 15 10:31:32 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -236,7 +236,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -113,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -463,7 +463,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -645,7 +645,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -218,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -701,7 +701,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:55 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -312,7 +312,7 @@ found objects, so you can use it for things like setting cache expiration.</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -124,7 +124,7 @@ render helper in Grape::Helpers::ActiveModelSerializers</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -169,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -186,7 +186,7 @@ posts.page, total_pages: posts.total_pages })</p>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:52 2016 by
|
Generated on Wed Jun 15 10:31:29 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:51 2016 by
|
Generated on Wed Jun 15 10:31:28 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:53 2016 by
|
Generated on Wed Jun 15 10:31:30 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -183,7 +183,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:54 2016 by
|
Generated on Wed Jun 15 10:31:31 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
68
_index.html
68
_index.html
@ -67,6 +67,72 @@
|
|||||||
<li class="r1"><a href="index.html" title="README">README</a></li>
|
<li class="r1"><a href="index.html" title="README">README</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.adapters.html" title="adapters">adapters</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.caching.html" title="caching">caching</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.configuration_options.html" title="configuration_options">configuration_options</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.deserialization.html" title="deserialization">deserialization</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.getting_started.html" title="getting_started">getting_started</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.instrumentation.html" title="instrumentation">instrumentation</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.key_transforms.html" title="key_transforms">key_transforms</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.logging.html" title="logging">logging</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.rendering.html" title="rendering">rendering</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.serializers.html" title="serializers">serializers</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.add_pagination_links.html" title="add_pagination_links">add_pagination_links</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.add_root_key.html" title="add_root_key">add_root_key</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.outside_controller_use.html" title="outside_controller_use">outside_controller_use</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.passing_arbitrary_options.html" title="passing_arbitrary_options">passing_arbitrary_options</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.serialize_poro.html" title="serialize_poro">serialize_poro</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.test.html" title="test">test</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.ember-and-json-api.html" title="ember-and-json-api">ember-and-json-api</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.grape.html" title="grape">grape</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.errors.html" title="errors">errors</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.schema.html" title="schema">schema</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r2"><a href="file.0000-namespace.html" title="0000-namespace">0000-namespace</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="r1"><a href="file.template.html" title="template">template</a></li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
@ -870,7 +936,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:49 2016 by
|
Generated on Wed Jun 15 10:31:22 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
214
file.0000-namespace.html
Normal file
214
file.0000-namespace.html
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>
|
||||||
|
File: 0000-namespace
|
||||||
|
|
||||||
|
— Documentation by YARD 0.8.7.6
|
||||||
|
|
||||||
|
</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">
|
||||||
|
hasFrames = window.top.frames.main ? true : false;
|
||||||
|
relpath = '';
|
||||||
|
framesUrl = "frames.html#!file.0000-namespace.html";
|
||||||
|
</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 id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="_index.html">Index</a> »
|
||||||
|
<span class="title">File: 0000-namespace</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="class_list_link"
|
||||||
|
href="class_list.html">
|
||||||
|
Class List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="method_list_link"
|
||||||
|
href="method_list.html">
|
||||||
|
Method List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="file_list_link"
|
||||||
|
href="file_list.html">
|
||||||
|
File List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<iframe id="search_frame"></iframe>
|
||||||
|
|
||||||
|
<div id="content"><div id='filecontents'><ul><li>
|
||||||
|
<p>Start Date: (2015-10-29)</p>
|
||||||
|
</li><li>
|
||||||
|
<p>RFC PR: <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/pull/1310">github.com/rails-api/active_model_serializers/pull/1310</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p>ActiveModelSerializers Issue: <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/issues/1298">github.com/rails-api/active_model_serializers/issues/1298</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h1 id="label-Summary">Summary</h1>
|
||||||
|
|
||||||
|
<p>Provide a consistent API for the user of the AMS.</p>
|
||||||
|
|
||||||
|
<h1 id="label-Motivation">Motivation</h1>
|
||||||
|
|
||||||
|
<p>The actual public API is defined under <code>ActiveModelSerializers</code>,
|
||||||
|
<code>ActiveModel::Serializer</code> and <code>ActiveModel</code>.</p>
|
||||||
|
|
||||||
|
<p>At the <code>ActiveModel::Serializer</code> we have:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p><code>ActiveModel::Serializer.config</code></p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>ActiveModel::Serializer</code></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>At the <code>ActiveModelSerializers</code> we have:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p><code>ActiveModelSerializers::Model</code></p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>ActiveModelSerializers.logger</code></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>At <code>ActiveModel</code> we have:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p><code>ActiveModel::SerializableResource</code></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>The idea here is to provide a single namespace
|
||||||
|
<code>ActiveModelSerializers</code> to the user. Following the same idea we
|
||||||
|
have on other gems like <a
|
||||||
|
href="https://github.com/plataformatec/devise/blob/e9c82472ffe7c43a448945f77e034a0e47dde0bb/lib/devise.rb">Devise</a>,
|
||||||
|
<a
|
||||||
|
href="https://github.com/refile/refile/blob/6b24c293d044862dafbf1bfa4606672a64903aa2/lib/refile.rb">Refile</a>
|
||||||
|
and <a
|
||||||
|
href="https://github.com/rails/rails/blob/30bacc26f8f258b39e12f63fe52389a968d9c1ea/activejob/lib/active_job.rb">Active
|
||||||
|
Job</a> for example.</p>
|
||||||
|
|
||||||
|
<p>This way we are clarifing the boundaries of <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md#prehistory">ActiveModelSerializers
|
||||||
|
and Rails</a> and make clear that the <code>ActiveModel::Serializer</code>
|
||||||
|
class is no longer the primary behavior of the ActiveModelSerializers.</p>
|
||||||
|
|
||||||
|
<h1 id="label-Detailed+design">Detailed design</h1>
|
||||||
|
|
||||||
|
<h2 id="label-New+classes+and+modules+organization">New classes and modules organization</h2>
|
||||||
|
|
||||||
|
<p>Since this will be a big change we can do this on baby steps, read small
|
||||||
|
pull requests. A possible approach is:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>All new code will be in <code>lib/active_model_serializers/</code> using
|
||||||
|
the module namespace <code>ActiveModelSerializers</code>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Move all content under <code>ActiveModel::Serializer</code> to be under
|
||||||
|
<code>ActiveModelSerializers</code>, the adapter is on this steps;</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Move all content under <code>ActiveModel</code> to be under
|
||||||
|
<code>ActiveModelSerializers</code>, the <code>SerializableResource</code>
|
||||||
|
is on this step;</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Change all public API that doesn't make sense, keeping in mind only to
|
||||||
|
keep this in the same namespace</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Update the README;</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Update the docs;</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>The following table represents the current and the desired classes and
|
||||||
|
modules at the first moment.</p>
|
||||||
|
|
||||||
|
<p>| Current | Desired | Notes |
|
||||||
|
|——————————————————–|————————————————–|——————–| |
|
||||||
|
<code>ActiveModelSerializers</code> and
|
||||||
|
<code>ActiveModel::Serializer</code> | <code>ActiveModelSerializers</code>
|
||||||
|
| The main namespace | | <code>ActiveModelSerializers.logger</code> |
|
||||||
|
<code>ActiveModelSerializers.logger</code> || |
|
||||||
|
<code>ActiveModelSerializers::Model</code> |
|
||||||
|
<code>ActiveModelSerializers::Model</code> || |
|
||||||
|
<code>ActiveModel::SerializableResource</code> |
|
||||||
|
<code>ActiveModelSerializers::SerializableResource</code> || |
|
||||||
|
<code>ActiveModel::Serializer</code> |
|
||||||
|
<code>ActiveModelSerializers::Serializer</code> | The name can be discussed
|
||||||
|
in a future pull request. For example, we can rename this to
|
||||||
|
<code>Resource</code> <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/pull/1301/files#r42963185">following
|
||||||
|
this idea</a> more info about naming in the next section| |
|
||||||
|
<code>ActiveModel::Serializer.config</code> |
|
||||||
|
<code>ActiveModelSerializers.config</code> ||</p>
|
||||||
|
|
||||||
|
<h2 id="label-Renaming+of+class+and+modules">Renaming of class and modules</h2>
|
||||||
|
|
||||||
|
<p>When moving some content to the new namespace we can find some names that
|
||||||
|
does not make much sense like
|
||||||
|
<code>ActiveModel::Serializer::Adapter::JsonApi</code>. Discussion of
|
||||||
|
renaming existing classes / modules and JsonApi objects will happen in
|
||||||
|
separate pull requests, and issues, and in the google doc <a
|
||||||
|
href="https://docs.google.com/document/d/1rcrJr0sVcazY2Opd_6Kmv1iIwuHbI84s1P_NzFn-05c/edit?usp=sharing">docs.google.com/document/d/1rcrJr0sVcazY2Opd_6Kmv1iIwuHbI84s1P_NzFn-05c/edit?usp=sharing</a></p>
|
||||||
|
|
||||||
|
<p>Some of names already have a definition.</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>Adapters get their own namespace under ActiveModelSerializers. E.g
|
||||||
|
<code>ActiveModelSerializers::Adapter</code></p>
|
||||||
|
</li><li>
|
||||||
|
<p>Serializers get their own namespace under ActiveModelSerializers. E.g
|
||||||
|
<code>ActiveModelSerializers::Serializer</code></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2 id="label-Keeping+compatibility">Keeping compatibility</h2>
|
||||||
|
|
||||||
|
<p>All moved classes or modules be aliased to their old name and location with
|
||||||
|
deprecation warnings, such as <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/pull/1251">was
|
||||||
|
done for CollectionSerializer</a>.</p>
|
||||||
|
|
||||||
|
<h1 id="label-Drawbacks">Drawbacks</h1>
|
||||||
|
|
||||||
|
<p>This will be a breaking change, so all users serializers will be broken
|
||||||
|
after a major bump. All pull requests will need to rebase since the
|
||||||
|
architeture will change a lot.</p>
|
||||||
|
|
||||||
|
<h1 id="label-Alternatives">Alternatives</h1>
|
||||||
|
|
||||||
|
<p>We can keep the way it is, and keep in mind to not add another namespace as
|
||||||
|
a public API.</p>
|
||||||
|
|
||||||
|
<h1 id="label-Unresolved+questions">Unresolved questions</h1>
|
||||||
|
|
||||||
|
<p>What is the better class name to be used to the class that will be
|
||||||
|
inherited at the creation of a serializer. This can be discussed in other
|
||||||
|
RFC or directly via pull request.</p>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated on Wed Jun 15 10:31:27 2016 by
|
||||||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
|
0.8.7.6 (ruby-2.2.4).
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
265
file.ARCHITECTURE.html
Normal file
265
file.ARCHITECTURE.html
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>
|
||||||
|
File: ARCHITECTURE
|
||||||
|
|
||||||
|
— Documentation by YARD 0.8.7.6
|
||||||
|
|
||||||
|
</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">
|
||||||
|
hasFrames = window.top.frames.main ? true : false;
|
||||||
|
relpath = '';
|
||||||
|
framesUrl = "frames.html#!file.ARCHITECTURE.html";
|
||||||
|
</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 id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="_index.html">Index</a> »
|
||||||
|
<span class="title">File: ARCHITECTURE</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="class_list_link"
|
||||||
|
href="class_list.html">
|
||||||
|
Class List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="method_list_link"
|
||||||
|
href="method_list.html">
|
||||||
|
Method List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="file_list_link"
|
||||||
|
href="file_list.html">
|
||||||
|
File List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<iframe id="search_frame"></iframe>
|
||||||
|
|
||||||
|
<div id="content"><div id='filecontents'>
|
||||||
|
<p><a href="README.md">Back to Guides</a></p>
|
||||||
|
|
||||||
|
<p>This document focuses on architecture the 0.10.x version of
|
||||||
|
ActiveModelSerializers. If you are interested in the architecture of the
|
||||||
|
0.8 or 0.9 versions, please refer to the <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/0-8-stable/README.md">0.8
|
||||||
|
README</a> or <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/0-9-stable/README.md">0.9
|
||||||
|
README</a>.</p>
|
||||||
|
|
||||||
|
<p>The original design is also available <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/d72b66d4c5355b0ff0a75a04895fcc4ea5b0c65e/README.textile">here</a>.</p>
|
||||||
|
|
||||||
|
<h1 id="label-ARCHITECTURE">ARCHITECTURE</h1>
|
||||||
|
|
||||||
|
<p>An <strong><code>ActiveModel::Serializer</code></strong> wraps a <a
|
||||||
|
href="https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/serialization.rb">serializable
|
||||||
|
resource</a> and exposes an <code>attributes</code> method, among a few
|
||||||
|
others. It allows you to specify which attributes and associations should
|
||||||
|
be represented in the serializatation of the resource. It requires an
|
||||||
|
adapter to transform its attributes into a JSON document; it cannot be
|
||||||
|
serialized itself. It may be useful to think of it as a <a
|
||||||
|
href="http://blog.steveklabnik.com/posts/2011-09-09-better-ruby-presenters">presenter</a>.</p>
|
||||||
|
|
||||||
|
<p>The <strong><code>ActiveModel::ArraySerializer</code></strong> represent a
|
||||||
|
collection of resources as serializers and, if there is no serializer,
|
||||||
|
primitives.</p>
|
||||||
|
|
||||||
|
<p>The <strong><code>ActiveModel::Adapter</code></strong> describes the
|
||||||
|
structure of the JSON document generated from a serializer. For example,
|
||||||
|
the <code>Attributes</code> example represents each serializer as its
|
||||||
|
unmodified attributes. The <code>JsonApi</code> adapter represents the
|
||||||
|
serializer as a <a href="http://jsonapi.org/">JSON API</a> document.</p>
|
||||||
|
|
||||||
|
<p>The
|
||||||
|
<strong><code>ActiveModelSerializers::SerializableResource</code></strong>
|
||||||
|
acts to coordinate the serializer(s) and adapter to an object that responds
|
||||||
|
to <code>to_json</code>, and <code>as_json</code>. It is used in the
|
||||||
|
controller to encapsulate the serialization resource when rendered.
|
||||||
|
However, it can also be used on its own to serialize a resource outside of
|
||||||
|
a controller, as well.</p>
|
||||||
|
|
||||||
|
<h2 id="label-Primitive+handling">Primitive handling</h2>
|
||||||
|
|
||||||
|
<p>Definitions: A primitive is usually a String or Array. There is no
|
||||||
|
serializer defined for them; they will be serialized when the resource is
|
||||||
|
converted to JSON (<code>as_json</code> or <code>to_json</code>). (The
|
||||||
|
below also applies for any object with no serializer.)</p>
|
||||||
|
|
||||||
|
<p>ActiveModelSerializers doesn't handle primitives passed to <code>render
|
||||||
|
json:</code> at all.</p>
|
||||||
|
|
||||||
|
<p>However, when a primitive value is an attribute or in a collection, it is
|
||||||
|
not modified.</p>
|
||||||
|
|
||||||
|
<p>Internally, if no serializer can be found in the controller, the resource
|
||||||
|
is not decorated by ActiveModelSerializers.</p>
|
||||||
|
|
||||||
|
<p>If the collection serializer (ArraySerializer) cannot identify a serializer
|
||||||
|
for a resource in its collection, it raises <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/issues/1191#issuecomment-142327128">NoSerializerError</a>
|
||||||
|
which is rescued in
|
||||||
|
<code>ActiveModel::Serializer::Reflection#build_association</code> which
|
||||||
|
sets the association value directly:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_reflection_options'>reflection_options</span><span class='lbracket'>[</span><span class='symbol'>:virtual_value</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_association_value'>association_value</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:as_json</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_association_value'>association_value</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>(which is called by the adapter as
|
||||||
|
<code>serializer.associations(*)</code>.)</p>
|
||||||
|
|
||||||
|
<h2 id="label-How+options+are+parsed">How options are parsed</h2>
|
||||||
|
|
||||||
|
<p>High-level overview:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>For a collection</p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>:serializer</code> specifies the collection serializer and</p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>:each_serializer</code> specifies the serializer for each resource in
|
||||||
|
the collection.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>For a single resource, the <code>:serializer</code> option is the resource
|
||||||
|
serializer.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Options are partitioned in serializer options and adapter options. Keys for
|
||||||
|
adapter options are specified by <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/serializable_resource.rb#L5">ADAPTER_OPTION_KEYS</a>.
|
||||||
|
The remaining options are serializer options.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>Details:</p>
|
||||||
|
<ol><li>
|
||||||
|
<p><strong>ActionController::Serialization</strong></p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>serializable_resource =
|
||||||
|
ActiveModelSerializers::SerializableResource.new(resource, options)</code></p>
|
||||||
|
<ol><li>
|
||||||
|
<p><code>options</code> are partitioned into <code>adapter_opts</code> and
|
||||||
|
everything else (<code>serializer_opts</code>). The
|
||||||
|
<code>adapter_opts</code> keys are defined in
|
||||||
|
<code>ActiveModelSerializers::SerializableResource::ADAPTER_OPTION_KEYS</code>.</p>
|
||||||
|
</li></ol>
|
||||||
|
</li><li>
|
||||||
|
<p><strong>ActiveModelSerializers::SerializableResource</strong></p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>if serializable_resource.serializer?</code> (there is a serializer
|
||||||
|
for the resource, and an adapter is used.)</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>Where <code>serializer?</code> is <code>use_adapter? &&
|
||||||
|
!!(serializer)</code></p>
|
||||||
|
</li><li>
|
||||||
|
<p>Where <code>use_adapter?</code>: 'True when no explicit adapter given,
|
||||||
|
or explicit value is truthy (non-nil); False when explicit adapter is falsy
|
||||||
|
(nil or false)'</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Where <code>serializer</code>:</p>
|
||||||
|
<ol><li>
|
||||||
|
<p>from explicit <code>:serializer</code> option, else</p>
|
||||||
|
</li><li>
|
||||||
|
<p>implicitly from resource
|
||||||
|
<code>ActiveModel::Serializer.serializer_for(resource)</code></p>
|
||||||
|
</li></ol>
|
||||||
|
</li></ul>
|
||||||
|
</li><li>
|
||||||
|
<p>A side-effect of checking <code>serializer</code> is:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>The <code>:serializer</code> option is removed from the serializer_opts
|
||||||
|
hash</p>
|
||||||
|
</li><li>
|
||||||
|
<p>If the <code>:each_serializer</code> option is present, it is removed from
|
||||||
|
the serializer_opts hash and set as the <code>:serializer</code> option</p>
|
||||||
|
</li></ul>
|
||||||
|
</li><li>
|
||||||
|
<p>The serializer and adapter are created as</p>
|
||||||
|
<ol><li>
|
||||||
|
<p><code>serializer_instance = serializer.new(resource,
|
||||||
|
serializer_opts)</code></p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>adapter_instance =
|
||||||
|
ActiveModel::Serializer::Adapter.create(serializer_instance,
|
||||||
|
adapter_opts)</code></p>
|
||||||
|
</li></ol>
|
||||||
|
</li><li>
|
||||||
|
<p><strong>ActiveModel::Serializer::ArraySerializer#new</strong></p>
|
||||||
|
</li><li>
|
||||||
|
<p>If the <code>serializer_instance</code> was a <code>ArraySerializer</code>
|
||||||
|
and the <code>:serializer</code> serializer_opts is present, then <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/a54d237e2828fe6bab1ea5dfe6360d4ecc8214cd/lib/active_model/serializer/array_serializer.rb#L14-L16">that
|
||||||
|
serializer is passed into each resource</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><strong>ActiveModel::Serializer#attributes</strong> is used by the adapter
|
||||||
|
to get the attributes for resource as defined by the serializer.</p>
|
||||||
|
</li></ol>
|
||||||
|
|
||||||
|
<h2 id="label-What+does+a+-27serializable+resource-27+look+like-3F">What does a 'serializable resource' look like?</h2>
|
||||||
|
<ul><li>
|
||||||
|
<p>An <code>ActiveRecord::Base</code> object.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Any Ruby object that passes the <a
|
||||||
|
href="http://www.rubydoc.info/github/rails-api/active_model_serializers/ActiveModel/Serializer/Lint/Tests">Lint</a>
|
||||||
|
<a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model/serializer/lint.rb">code</a>.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>ActiveModelSerializers provides a <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/model.rb">ActiveModelSerializers::Model</a>,
|
||||||
|
which is a simple serializable PORO (Plain-Old Ruby Object).</p>
|
||||||
|
|
||||||
|
<p>ActiveModelSerializers::Model may be used either as a template, or in
|
||||||
|
production code.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>MyModel</span> <span class='op'><</span> <span class='const'>ActiveModelSerializers</span><span class='op'>::</span><span class='const'>Model</span>
|
||||||
|
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:id</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:level</span>
|
||||||
|
<span class='kw'>end</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The default serializer for <code>MyModel</code> would be
|
||||||
|
<code>MyModelSerializer</code> whether MyModel is an ActiveRecord::Base
|
||||||
|
object or not.</p>
|
||||||
|
|
||||||
|
<p>Outside of the controller the rules are <strong>exactly</strong> the same
|
||||||
|
as for records. For example:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='const'>MyModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>level:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>awesome</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>adapter:</span> <span class='symbol'>:json</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>would be serialized the same as</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='const'>ActiveModelSerializers</span><span class='op'>::</span><span class='const'>SerializableResource</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>MyModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>level:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>awesome</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>adapter:</span> <span class='symbol'>:json</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_as_json'>as_json</span>
|
||||||
|
</code></pre>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated on Wed Jun 15 10:25:09 2016 by
|
||||||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
|
0.8.7.6 (ruby-2.2.4).
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1484
file.CHANGELOG.html
Normal file
1484
file.CHANGELOG.html
Normal file
File diff suppressed because it is too large
Load Diff
207
file.CONTRIBUTING.html
Normal file
207
file.CONTRIBUTING.html
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>
|
||||||
|
File: CONTRIBUTING
|
||||||
|
|
||||||
|
— Documentation by YARD 0.8.7.6
|
||||||
|
|
||||||
|
</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">
|
||||||
|
hasFrames = window.top.frames.main ? true : false;
|
||||||
|
relpath = '';
|
||||||
|
framesUrl = "frames.html#!file.CONTRIBUTING.html";
|
||||||
|
</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 id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="_index.html">Index</a> »
|
||||||
|
<span class="title">File: CONTRIBUTING</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="class_list_link"
|
||||||
|
href="class_list.html">
|
||||||
|
Class List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="method_list_link"
|
||||||
|
href="method_list.html">
|
||||||
|
Method List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="file_list_link"
|
||||||
|
href="file_list.html">
|
||||||
|
File List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<iframe id="search_frame"></iframe>
|
||||||
|
|
||||||
|
<div id="content"><div id='filecontents'>
|
||||||
|
<h2 id="label-Have+an+issue-3F">Have an issue?</h2>
|
||||||
|
|
||||||
|
<p>Before opening an issue, try the following:</p>
|
||||||
|
|
||||||
|
<h5 id="label-Consult+the+documentation">Consult the documentation</h5>
|
||||||
|
|
||||||
|
<p>See if your issue can be resolved by information in the documentation.</p>
|
||||||
|
<ul><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/master/docs">0.10
|
||||||
|
(master) Documentation</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="http://www.rubydoc.info/github/rails-api/active_model_serializers/v0.10.0"><img
|
||||||
|
src="http://img.shields.io/badge/yard-docs-blue.svg"></a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="docs">Guides</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/0-9-stable">0.9
|
||||||
|
(0-9-stable) Documentation</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/0-8-stable">0.8
|
||||||
|
(0-8-stable) Documentation</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h5 id="label-Check+for+an+existing+issue">Check for an existing issue</h5>
|
||||||
|
|
||||||
|
<p>Take a look at the issues to see if a similar one has already been created.
|
||||||
|
If one exists, please add any additional information that might expedite
|
||||||
|
resolution.</p>
|
||||||
|
|
||||||
|
<h4 id="label-Open+an+issue">Open an issue</h4>
|
||||||
|
|
||||||
|
<p>If the documentation wasn't able to help resolve the issue and no issue
|
||||||
|
already exists, please open a new issue with the following in mind:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>Please make sure only to include one issue per report. If you encounter
|
||||||
|
multiple, unrelated issues, please report them as such.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Be detailed. Provide backtraces and example code when possible. Provide
|
||||||
|
information about your environment. e.g., Ruby version, rails version, etc.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Own your issue. Actively participate in the discussion and help drive the
|
||||||
|
issue to closure.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>If you resolve your own issue, please share the details on the issue and
|
||||||
|
close it out. Others might have the same issue and sharing solutions is
|
||||||
|
helpful.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2 id="label-Contributing">Contributing</h2>
|
||||||
|
|
||||||
|
<p>Contributing can be done in many ways and is not exclusive to code. If you
|
||||||
|
have thoughts on a particular issue or feature, we encourage you to open
|
||||||
|
new issues for discussion or add your comments to existing ones.</p>
|
||||||
|
|
||||||
|
<h4 id="label-Pull+requests">Pull requests</h4>
|
||||||
|
|
||||||
|
<p>We also gladly welcome pull requests. When preparing to work on pull
|
||||||
|
request, please adhere to these standards:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>Base work on the master branch unless fixing an issue with <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/0-9-stable">0.9-stable</a>
|
||||||
|
or <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/0-8-stable">0.8-stable</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p>Squash your commits and regularly rebase off master.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Provide a description of the changes contained in the pull request.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Note any specific areas that should be reviewed.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Include tests.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>The test suite must pass on <a href=".travis.yml">supported Ruby
|
||||||
|
versions</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p>Include updates to the <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/tree/master/docs">documentation</a>
|
||||||
|
where applicable.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Update the <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md">CHANGELOG</a>
|
||||||
|
to the appropriate sections with a brief description of the changes.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Do not change the VERSION file.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h4 id="label-Running+tests">Running tests</h4>
|
||||||
|
|
||||||
|
<p>Run all tests</p>
|
||||||
|
|
||||||
|
<p><code>$ rake test</code></p>
|
||||||
|
|
||||||
|
<p>Run a single test suite</p>
|
||||||
|
|
||||||
|
<p><code>$ rake test TEST=path/to/test.rb</code></p>
|
||||||
|
|
||||||
|
<p>Run a single test</p>
|
||||||
|
|
||||||
|
<p><code>$ rake test TEST=path/to/test.rb
|
||||||
|
TESTOPTS="--name=test_something"</code></p>
|
||||||
|
|
||||||
|
<p>Run tests against different Rails versions by setting the RAILS_VERSION
|
||||||
|
variable and bundling gems. (save this script somewhere executable and run
|
||||||
|
from top of AMS repository)</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby">#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rcommand='puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")'
|
||||||
|
versions=$(ruby -ryaml -e "$rcommand")
|
||||||
|
|
||||||
|
for version in ${versions[@]}; do
|
||||||
|
export RAILS_VERSION="$version"
|
||||||
|
rm -f Gemfile.lock
|
||||||
|
bundle check || bundle --local || bundle
|
||||||
|
bundle exec rake test
|
||||||
|
if [ "$?" -eq 0 ]; then
|
||||||
|
# green in ANSI
|
||||||
|
echo -e "\033[32m **** Tests passed against Rails ${RAILS_VERSION} **** \033[0m"
|
||||||
|
else
|
||||||
|
# red in ANSI
|
||||||
|
echo -e "\033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m"
|
||||||
|
read -p '[Enter] any key to continue, [q] to quit...' prompt
|
||||||
|
if [ "$prompt" = 'q' ]; then
|
||||||
|
unset RAILS_VERSION
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset RAILS_VERSION
|
||||||
|
done</code></pre>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated on Wed Jun 15 10:25:09 2016 by
|
||||||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
|
0.8.7.6 (ruby-2.2.4).
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -253,7 +253,7 @@ information.</p>
|
|||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Tue Jun 14 10:45:50 2016 by
|
Generated on Wed Jun 15 10:31:22 2016 by
|
||||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
0.8.7.6 (ruby-2.2.4).
|
0.8.7.6 (ruby-2.2.4).
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
186
file.STYLE.html
Normal file
186
file.STYLE.html
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>
|
||||||
|
File: STYLE
|
||||||
|
|
||||||
|
— Documentation by YARD 0.8.7.6
|
||||||
|
|
||||||
|
</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">
|
||||||
|
hasFrames = window.top.frames.main ? true : false;
|
||||||
|
relpath = '';
|
||||||
|
framesUrl = "frames.html#!file.STYLE.html";
|
||||||
|
</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 id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="_index.html">Index</a> »
|
||||||
|
<span class="title">File: STYLE</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="class_list_link"
|
||||||
|
href="class_list.html">
|
||||||
|
Class List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="method_list_link"
|
||||||
|
href="method_list.html">
|
||||||
|
Method List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="file_list_link"
|
||||||
|
href="file_list.html">
|
||||||
|
File List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<iframe id="search_frame"></iframe>
|
||||||
|
|
||||||
|
<div id="content"><div id='filecontents'>
|
||||||
|
<h1 id="label-STYLE">STYLE</h1>
|
||||||
|
|
||||||
|
<h2 id="label-Code+and+comments">Code and comments</h2>
|
||||||
|
<ul><li>
|
||||||
|
<p>We are actively working to identify tasks under the label <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors">Good
|
||||||
|
for New Contributors</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed">Changelog
|
||||||
|
Missing</a> is an easy way to help out.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/labels/Ready%20for%20PR">Fix
|
||||||
|
a bug</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Ready for PR - A well defined bug, needs someone to PR a fix.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Bug - Anything that is broken.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Regression - A bug that did not exist in previous versions and isn't a
|
||||||
|
new feature (applied in tandem with Bug).</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Performance - A performance related issue. We could track this as a bug,
|
||||||
|
but usually these would have slightly lower priority than standard bugs.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/labels/Feature">Develop
|
||||||
|
new features</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://codeclimate.com/github/rails-api/active_model_serializers/code?sort=smell_count&sort_direction=desc">Improve
|
||||||
|
code quality</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://codeclimate.com/github/rails-api/active_model_serializers/coverage?sort=covered_percent&sort_direction=asc">Improve
|
||||||
|
amount of code exercised by tests</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/.rubocop_todo.yml">Fix
|
||||||
|
RuboCop (Style) TODOS</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>Delete and offsense, run <code>rake rubocop</code> (or possibly <code>rake
|
||||||
|
rubocop:auto_correct</code>), and <a
|
||||||
|
href="CONTRIBUTING.md#submitting-a-pull-request-pr">submit a PR</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>We are also encouraging comments to substantial changes (larger than
|
||||||
|
bugfixes and simple features) under an "RFC" (Request for Comments)
|
||||||
|
process before we start active development. Look for the <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/labels/RFC">RFC</a>
|
||||||
|
label.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2 id="label-Pull+requests">Pull requests</h2>
|
||||||
|
<ul><li>
|
||||||
|
<p>If the tests pass and the pull request looks good, a maintainer will merge
|
||||||
|
it.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>If the pull request needs to be changed,</p>
|
||||||
|
</li><li>
|
||||||
|
<p>you can change it by updating the branch you generated the pull request
|
||||||
|
from</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>either by adding more commits, or</p>
|
||||||
|
</li><li>
|
||||||
|
<p>by force pushing to it</p>
|
||||||
|
</li></ul>
|
||||||
|
</li><li>
|
||||||
|
<p>A maintainer can make any changes themselves and manually merge the code
|
||||||
|
in.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2 id="label-Commit+messages">Commit messages</h2>
|
||||||
|
<ul><li>
|
||||||
|
<p><a
|
||||||
|
href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">A
|
||||||
|
Note About Git Commit Messages</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="http://stopwritingramblingcommitmessages.com/">stopwritingramblingcommitmessages.com/</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="https://github.com/thoughtbot/guides/tree/master/style#git">ThoughtBot
|
||||||
|
style guide</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h4 id="label-About+Pull+Requests+-28PR-27s-29">About Pull Requests (PR's)</h4>
|
||||||
|
<ul><li>
|
||||||
|
<p><a href="https://help.github.com/articles/using-pull-requests">Using Pull
|
||||||
|
Requests</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="http://www.element84.com/github-pull-requests-made-easy.html">Github
|
||||||
|
pull requests made easy</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="http://help.exercism.io/git-workflow.html">Exercism Git
|
||||||
|
Workflow</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="http://rakeroutes.com/blog/deliberate-git/">Level up your Git</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a
|
||||||
|
href="http://www.benjaminfleischer.com/2013/07/30/all-your-open-source-code-are-belong-to-us/">All
|
||||||
|
Your Open Source Code Are Belong To Us</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2 id="label-Issue+Labeling">Issue Labeling</h2>
|
||||||
|
|
||||||
|
<p>ActiveModelSerializers uses a subset of <a
|
||||||
|
href="https://github.com/wagenet/StandardIssueLabels">StandardIssueLabels</a>
|
||||||
|
for Github Issues. You can <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/labels">see our
|
||||||
|
labels here</a>.</p>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated on Wed Jun 15 10:25:09 2016 by
|
||||||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
|
0.8.7.6 (ruby-2.2.4).
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
346
file.adapters.html
Normal file
346
file.adapters.html
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>
|
||||||
|
File: adapters
|
||||||
|
|
||||||
|
— Documentation by YARD 0.8.7.6
|
||||||
|
|
||||||
|
</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">
|
||||||
|
hasFrames = window.top.frames.main ? true : false;
|
||||||
|
relpath = '';
|
||||||
|
framesUrl = "frames.html#!file.adapters.html";
|
||||||
|
</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 id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="_index.html">Index</a> »
|
||||||
|
<span class="title">File: adapters</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="class_list_link"
|
||||||
|
href="class_list.html">
|
||||||
|
Class List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="method_list_link"
|
||||||
|
href="method_list.html">
|
||||||
|
Method List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="full_list_link" id="file_list_link"
|
||||||
|
href="file_list.html">
|
||||||
|
File List
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<iframe id="search_frame"></iframe>
|
||||||
|
|
||||||
|
<div id="content"><div id='filecontents'>
|
||||||
|
<p><a href="../README.md">Back to Guides</a></p>
|
||||||
|
|
||||||
|
<h1 id="label-Adapters">Adapters</h1>
|
||||||
|
|
||||||
|
<p>ActiveModelSerializers offers the ability to configure which adapter to use
|
||||||
|
both globally and/or when serializing (usually when rendering).</p>
|
||||||
|
|
||||||
|
<p>The global adapter configuration is set on <a
|
||||||
|
href="configuration_options.md">ActiveModelSerializers.config</a>. It
|
||||||
|
should be set only once, preferably at initialization.</p>
|
||||||
|
|
||||||
|
<p>For example:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='const'>ActiveModelSerializers</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>=</span> <span class='const'>ActiveModelSerializers</span><span class='op'>::</span><span class='const'>Adapter</span><span class='op'>::</span><span class='const'>JsonApi</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>or</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='const'>ActiveModelSerializers</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>=</span> <span class='symbol'>:json_api</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>or</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='const'>ActiveModelSerializers</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>=</span> <span class='symbol'>:json</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The local adapter option is in the format <code>adapter: adapter</code>,
|
||||||
|
where <code>adapter</code> is any of the same values as set globally.</p>
|
||||||
|
|
||||||
|
<p>The configured adapter can be set as a symbol, class, or class name, as
|
||||||
|
described in <a href="adapters.md#advanced-adapter-configuration">Advanced
|
||||||
|
adapter configuration</a>.</p>
|
||||||
|
|
||||||
|
<p>The <code>Attributes</code> adapter does not include a root key. It is just
|
||||||
|
the serialized attributes.</p>
|
||||||
|
|
||||||
|
<p>Use either the <code>JSON</code> or <code>JSON API</code> adapters if you
|
||||||
|
want the response document to have a root key.</p>
|
||||||
|
|
||||||
|
<h2 id="label-Built+in+Adapters">Built in Adapters</h2>
|
||||||
|
|
||||||
|
<h3 id="label-Attributes+-+Default">Attributes - Default</h3>
|
||||||
|
|
||||||
|
<p>It's the default adapter, it generates a json response without a root
|
||||||
|
key. Doesn't follow any specific convention.</p>
|
||||||
|
|
||||||
|
<h5 id="label-Example+output">Example output</h5>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>title</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Title 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Body 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>publish_at</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>2020-03-16T03:55:25.291Z</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>author</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>first_name</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bob</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>last_name</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jones</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>comments</span><span class='label_end'>":</span> <span class='lbracket'>[</span>
|
||||||
|
<span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cool</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>awesome</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbracket'>]</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3 id="label-JSON">JSON</h3>
|
||||||
|
|
||||||
|
<p>The json response is always rendered with a root key.</p>
|
||||||
|
|
||||||
|
<p>The root key can be overridden by: * passing the <code>root</code> option
|
||||||
|
in the render call. See details in the <a
|
||||||
|
href="rendering.md#overriding-the-root-key">Rendering Guides</a>. * setting
|
||||||
|
the <code>type</code> of the serializer. See details in the <a
|
||||||
|
href="serializers.md#type">Serializers Guide</a>.</p>
|
||||||
|
|
||||||
|
<p>Doesn't follow any specific convention.</p>
|
||||||
|
|
||||||
|
<h5 id="label-Example+output">Example output</h5>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>post</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>title</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Title 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Body 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>publish_at</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>2020-03-16T03:55:25.291Z</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>author</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>first_name</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bob</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>last_name</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jones</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>comments</span><span class='label_end'>":</span> <span class='lbracket'>[</span><span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cool</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>awesome</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='rbracket'>]</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3 id="label-JSON+API">JSON API</h3>
|
||||||
|
|
||||||
|
<p>This adapter follows <strong>version 1.0</strong> of the <a
|
||||||
|
href="../jsonapi/schema.md">format specified</a> in <a
|
||||||
|
href="http://jsonapi.org/format">jsonapi.org/format</a>.</p>
|
||||||
|
|
||||||
|
<h5 id="label-Example+output">Example output</h5>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>id</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1337</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>type</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>posts</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>attributes</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>title</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Title 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>body</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Body 1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>publish-at</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>2020-03-16T03:55:25.291Z</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>relationships</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>author</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>id</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>type</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>authors</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>comments</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='label_end'>":</span> <span class='lbracket'>[</span><span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>id</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>7</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>type</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>comments</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>id</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>12</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>type</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>comments</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='rbracket'>]</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>links</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>post-authors</span><span class='label_end'>":</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://example.com/post_authors</span><span class='tstring_end'>"</span></span>
|
||||||
|
<span class='rbrace'>}</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>meta</span><span class='label_end'>":</span> <span class='lbrace'>{</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rating</span><span class='label_end'>":</span> <span class='int'>5</span><span class='comma'>,</span>
|
||||||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>favorite-count</span><span class='label_end'>":</span> <span class='int'>10</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
<span class='rbrace'>}</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h4 id="label-Included">Included</h4>
|
||||||
|
|
||||||
|
<p>It will include the associated resources in the
|
||||||
|
<code>"included"</code> member when the resource names are
|
||||||
|
included in the <code>include</code> option. Including nested associated
|
||||||
|
resources is also supported.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@posts</span><span class='comma'>,</span> <span class='label'>include:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>author</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comments</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comments.author</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
||||||
|
<span class='comment'># or
|
||||||
|
</span> <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@posts</span><span class='comma'>,</span> <span class='label'>include:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>author,comments,comments.author</span><span class='tstring_end'>'</span></span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>In addition, two types of wildcards may be used:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p><code>*</code> includes one level of associations.</p>
|
||||||
|
</li><li>
|
||||||
|
<p><code>**</code> includes all recursively.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>These can be combined with other paths.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@posts</span><span class='comma'>,</span> <span class='label'>include:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>**</span><span class='tstring_end'>'</span></span> <span class='comment'># or '*' for a single layer
|
||||||
|
</span></code></pre>
|
||||||
|
|
||||||
|
<p>The format of the <code>include</code> option can be either:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>a String composed of a comma-separated list of <a
|
||||||
|
href="http://jsonapi.org/format/#fetching-includes">relationship paths</a>.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>an Array of Symbols and Hashes.</p>
|
||||||
|
</li><li>
|
||||||
|
<p>a mix of both.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>The following would render posts and include:</p>
|
||||||
|
<ul><li>
|
||||||
|
<p>the author</p>
|
||||||
|
</li><li>
|
||||||
|
<p>the author's comments, and</p>
|
||||||
|
</li><li>
|
||||||
|
<p>every resource referenced by the author's comments (recursively).</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<p>It could be combined, like above, with other paths in any combination
|
||||||
|
desired.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@posts</span><span class='comma'>,</span> <span class='label'>include:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>author.comments.**</span><span class='tstring_end'>'</span></span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h5 id="label-Security+Considerations">Security Considerations</h5>
|
||||||
|
|
||||||
|
<p>Since the included options may come from the query params (i.e.
|
||||||
|
user-controller):</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@posts</span><span class='comma'>,</span> <span class='label'>include:</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:include</span><span class='rbracket'>]</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>The user could pass in <code>include=**</code>.</p>
|
||||||
|
|
||||||
|
<p>We recommend filtering any user-supplied includes appropriately.</p>
|
||||||
|
|
||||||
|
<h2 id="label-Advanced+adapter+configuration">Advanced adapter configuration</h2>
|
||||||
|
|
||||||
|
<h3 id="label-Registering+an+adapter">Registering an adapter</h3>
|
||||||
|
|
||||||
|
<p>The default adapter can be configured, as above, to use any class given to
|
||||||
|
it.</p>
|
||||||
|
|
||||||
|
<p>An adapter may also be specified, e.g. when rendering, as a class or as a
|
||||||
|
symbol. If a symbol, then the adapter must be, e.g.
|
||||||
|
<code>:great_example</code>,
|
||||||
|
<code>ActiveModelSerializers::Adapter::GreatExample</code>, or registered.</p>
|
||||||
|
|
||||||
|
<p>There are two ways to register an adapter:</p>
|
||||||
|
|
||||||
|
<p>1) The simplest, is to subclass
|
||||||
|
<code>ActiveModelSerializers::Adapter::Base</code>, e.g. the below will
|
||||||
|
register the <code>Example::UsefulAdapter</code> as
|
||||||
|
<code>"example/useful_adapter"</code>.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='kw'>module</span> <span class='const'>Example</span>
|
||||||
|
<span class='kw'>class</span> <span class='const'>UsefulAdapter</span> <span class='op'><</span> <span class='const'>ActiveModelSerializers</span><span class='op'>::</span><span class='const'>Adapter</span><span class='op'>::</span><span class='const'>Base</span>
|
||||||
|
<span class='kw'>end</span>
|
||||||
|
<span class='kw'>end</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>You'll notice that the name it registers is the underscored namespace
|
||||||
|
and class.</p>
|
||||||
|
|
||||||
|
<p>Under the covers, when the
|
||||||
|
<code>ActiveModelSerializers::Adapter::Base</code> is subclassed, it
|
||||||
|
registers the subclass as
|
||||||
|
<code>register("example/useful_adapter",
|
||||||
|
Example::UsefulAdapter)</code></p>
|
||||||
|
|
||||||
|
<p>2) Any class can be registered as an adapter by calling
|
||||||
|
<code>register</code> directly on the
|
||||||
|
<code>ActiveModelSerializers::Adapter</code> class. e.g., the below
|
||||||
|
registers <code>MyAdapter</code> as <code>:special_adapter</code>.</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>MyAdapter</span><span class='semicolon'>;</span> <span class='kw'>end</span>
|
||||||
|
<span class='const'>ActiveModelSerializers</span><span class='op'>::</span><span class='const'>Adapter</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='symbol'>:special_adapter</span><span class='comma'>,</span> <span class='const'>MyAdapter</span><span class='rparen'>)</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h3 id="label-Looking+up+an+adapter">Looking up an adapter</h3>
|
||||||
|
|
||||||
|
<p>| Method | Return value | | :———— |:—————| |
|
||||||
|
<code>ActiveModelSerializers::Adapter.adapter_map</code> | A Hash of all
|
||||||
|
known adapters <code>{ adapter_name => adapter_class }</code> | |
|
||||||
|
<code>ActiveModelSerializers::Adapter.adapters</code> | A (sorted) Array of
|
||||||
|
all known <code>adapter_names</code> | |
|
||||||
|
<code>ActiveModelSerializers::Adapter.lookup(name_or_klass)</code> | The
|
||||||
|
<code>adapter_class</code>, else raises an
|
||||||
|
<code>ActiveModelSerializers::Adapter::UnknownAdapter</code> error | |
|
||||||
|
<code>ActiveModelSerializers::Adapter.adapter_class(adapter)</code> |
|
||||||
|
Delegates to <code>ActiveModelSerializers::Adapter.lookup(adapter)</code> |
|
||||||
|
| <code>ActiveModelSerializers::Adapter.configured_adapter</code> | A
|
||||||
|
convenience method for
|
||||||
|
<code>ActiveModelSerializers::Adapter.lookup(config.adapter)</code> |</p>
|
||||||
|
|
||||||
|
<p>The registered adapter name is always a String, but may be looked up as a
|
||||||
|
Symbol or String. Helpfully, the Symbol or String is underscored, so that
|
||||||
|
<code>get(:my_adapter)</code> and <code>get("MyAdapter")</code>
|
||||||
|
may both be used.</p>
|
||||||
|
|
||||||
|
<p>For more information, see <a
|
||||||
|
href="https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/adapter.rb">the
|
||||||
|
Adapter class on GitHub</a></p>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated on Wed Jun 15 10:31:23 2016 by
|
||||||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||||
|
0.8.7.6 (ruby-2.2.4).
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user