Browse files

Update with content type

  • Loading branch information...
1 parent 4fbb2b3 commit 095b9799d909b1549a1c09bc9bb056f417aec25a @durran durran committed Jul 21, 2012
View
1 en/mongoid/docs/callbacks.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/contributing.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
10 en/mongoid/docs/documents.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
@@ -219,6 +220,15 @@
<div class="CodeRay">
<div class="code"><pre><span class="comment"># Get the field values as a hash.</span>&#x000A;person.attributes&#x000A;&#x000A;<span class="comment"># Set the field values in the document.</span>&#x000A;<span class="constant">Person</span>.new(first_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Jean-Baptiste</span><span class="delimiter">&quot;</span></span>, middle_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Emmanuel</span><span class="delimiter">&quot;</span></span>)&#x000A;person.attributes = { first_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Jean-Baptiste</span><span class="delimiter">&quot;</span></span>, middle_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Emmanuel</span><span class="delimiter">&quot;</span></span> }&#x000A;person.write_attributes(&#x000A; first_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Jean-Baptiste</span><span class="delimiter">&quot;</span></span>,&#x000A; middle_name: <span class="string"><span class="delimiter">&quot;</span><span class="content">Emmanuel</span><span class="delimiter">&quot;</span></span>&#x000A;)&#x000A;</pre></div>
</div>
+ <h3>Hash Field Keys</h3>
+ <p>
+ When using a field of type <code>Hash</code>, be wary of adhering to the
+ <a href="http://www.mongodb.org/display/DOCS/Legal+Key+Names">legal key names for mongoDB</a>
+ , or else the values will not store properly.
+ </p>
+ <div class="CodeRay">
+ <div class="code"><pre><span class="keyword">class</span> <span class="class">Person</span>&#x000A; include <span class="constant">Mongoid</span>::<span class="constant">Document</span>&#x000A; field <span class="symbol">:first_name</span>&#x000A; field <span class="symbol">:url</span>, type: <span class="constant">Hash</span>&#x000A; &#x000A; <span class="comment"># will update the fields properly and save the values</span>&#x000A; <span class="keyword">def</span> <span class="function">set_vals</span>&#x000A; <span class="predefined-constant">self</span>.first_name = <span class="string"><span class="delimiter">'</span><span class="content">Daniel</span><span class="delimiter">'</span></span>&#x000A; <span class="predefined-constant">self</span>.url = {<span class="string"><span class="delimiter">'</span><span class="content">home_page</span><span class="delimiter">'</span></span> =&gt; <span class="string"><span class="delimiter">'</span><span class="content">http://www.homepage.com</span><span class="delimiter">'</span></span>}&#x000A; save&#x000A; <span class="keyword">end</span>&#x000A; &#x000A; <span class="comment"># all data will fail to save due to the illegal hashkey</span>&#x000A; <span class="keyword">def</span> <span class="function">set_vals_fail</span>&#x000A; <span class="predefined-constant">self</span>.first_name = <span class="string"><span class="delimiter">'</span><span class="content">Daniel</span><span class="delimiter">'</span></span>&#x000A; <span class="predefined-constant">self</span>.url = {<span class="string"><span class="delimiter">'</span><span class="content">home.page</span><span class="delimiter">'</span></span> =&gt; <span class="string"><span class="delimiter">'</span><span class="content">http://www.homepage.com</span><span class="delimiter">'</span></span>}&#x000A; save&#x000A; <span class="keyword">end</span>&#x000A;<span class="keyword">end</span>&#x000A;</pre></div>
+ </div>
<h3>Defaults</h3>
<p>
You can tell a field in Mongoid to always have a default value if nothing
View
1 en/mongoid/docs/extras.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/identity_map.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/indexing.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/installation.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/nested_attributes.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/performance.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/persistence.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/querying.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/rails.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/relations.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/tips.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/upgrading.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/docs/validation.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/index.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/mongoid/links.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby ODM for MongoDB' name='description' />
<meta content='mongoid, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/docs/bson.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/docs/driver.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/docs/installation.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/docs/replication.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/index.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/moped/links.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A MongoDB driver for Ruby ' name='description' />
<meta content='mongoid, moped, mongodb, ruby, rails, odm, bernerd schaefer' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/docs/aliases.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/docs/installation.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/docs/options.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/docs/selection.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/docs/serialization.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/index.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
View
1 en/origin/links.html
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='A Ruby DSL for building MongoDB queries' name='description' />
<meta content='mongoid, origin, mongodb, ruby, rails, odm, durran jordan' name='keywords' />
<link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />

0 comments on commit 095b979

Please sign in to comment.