Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update with latest changes

  • Loading branch information...
commit 0c782a81360ec3aa7f437e5db72accc42e498540 1 parent 605000b
@durran durran authored
View
3  en/mongoid/docs/documents.html
@@ -177,6 +177,7 @@
<li><code>Hash</code></li>
<li><code>Integer</code></li>
<li><code>Moped::BSON::ObjectId</code></li>
+ <li><code>Moped::BSON::Binary</code></li>
<li><code>Range</code></li>
<li><code>Regexp</code></li>
<li><code>String</code></li>
@@ -348,7 +349,7 @@
like.
</p>
<div class="CodeRay">
- <div class="code"><pre><span class="keyword">class</span> <span class="class">Band</span>&#x000A; include <span class="constant">Mongoid</span>::<span class="constant">Document</span>&#x000A; field <span class="symbol">:name</span>, type: <span class="constant">String</span>&#x000A; field <span class="symbol">:_id</span>, type: <span class="constant">String</span>, default -&gt;{ name }&#x000A;<span class="keyword">end</span>&#x000A;</pre></div>
+ <div class="code"><pre><span class="keyword">class</span> <span class="class">Band</span>&#x000A; include <span class="constant">Mongoid</span>::<span class="constant">Document</span>&#x000A; field <span class="symbol">:name</span>, type: <span class="constant">String</span>&#x000A; field <span class="symbol">:_id</span>, type: <span class="constant">String</span>, default: -&gt;{ name }&#x000A;<span class="keyword">end</span>&#x000A;</pre></div>
</div>
</section>
<section id='dynamic_fields'>
View
2  en/origin/docs/aliases.html
@@ -94,7 +94,7 @@
this as the first argument to the queryable's constructor.
</p>
<div class="CodeRay">
- <div class="code"><pre><span class="keyword">class</span> <span class="class">Query</span>&#x000A; include <span class="constant">Origin</span>::<span class="constant">Queryable</span>&#x000A;<span class="keyword">end</span>&#x000A;&#x000A;queryable = <span class="constant">Query</span>.new({ <span class="string"><span class="delimiter">&quot;</span><span class="content">n</span><span class="delimiter">&quot;</span></span> =&gt; <span class="string"><span class="delimiter">&quot;</span><span class="content">name</span><span class="delimiter">&quot;</span></span> })&#x000A;</pre></div>
+ <div class="code"><pre><span class="keyword">class</span> <span class="class">Query</span>&#x000A; include <span class="constant">Origin</span>::<span class="constant">Queryable</span>&#x000A;<span class="keyword">end</span>&#x000A;&#x000A;queryable = <span class="constant">Query</span>.new({ <span class="string"><span class="delimiter">&quot;</span><span class="content">name</span><span class="delimiter">&quot;</span></span> =&gt; <span class="string"><span class="delimiter">&quot;</span><span class="content">n</span><span class="delimiter">&quot;</span></span> })&#x000A;</pre></div>
</div>
<p>
The aliases hash *must* be string keys and string values. Then you can do
View
2  en/origin/index.html
@@ -94,7 +94,7 @@
</table>
</div>
<div class="CodeRay">
- <div class="code"><pre><span class="keyword">class</span> <span class="class">Criteria</span>&#x000A; include <span class="constant">Origin</span>::<span class="constant">Queryable</span>&#x000A;<span class="keyword">end</span>&#x000A;&#x000A;criteria = <span class="constant">Criteria</span>.new&#x000A;criteria.where(name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Syd</span><span class="delimiter">&quot;</span></span>).gt(age: <span class="integer">10</span>).desc(<span class="symbol">:created_at</span>)&#x000A;&#x000A;criteria.selector <span class="comment">#=&gt; { name: &quot;Syd&quot;, age: { &quot;$gt&quot; =&gt; 10 }}</span>&#x000A;criteria.option <span class="comment">#=&gt; { sort: { created_at: -1 }}</span></pre></div>
+ <div class="code"><pre><span class="keyword">class</span> <span class="class">Criteria</span>&#x000A; include <span class="constant">Origin</span>::<span class="constant">Queryable</span>&#x000A;<span class="keyword">end</span>&#x000A;&#x000A;criteria = <span class="constant">Criteria</span>.new&#x000A;criteria.where(name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Syd</span><span class="delimiter">&quot;</span></span>).gt(age: <span class="integer">10</span>).desc(<span class="symbol">:created_at</span>)&#x000A;&#x000A;criteria.selector <span class="comment">#=&gt; { name: &quot;Syd&quot;, age: { &quot;$gt&quot; =&gt; 10 }}</span>&#x000A;criteria.options <span class="comment">#=&gt; { sort: { created_at: -1 }}</span></pre></div>
</div>
</div>
</div>

0 comments on commit 0c782a8

Please sign in to comment.
Something went wrong with that request. Please try again.