Skip to content

Commit

Permalink
Updating HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jcasimir committed Mar 27, 2012
1 parent 80d03b2 commit 2d59449
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions public/projects/sales_engine.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ <h5><code>Invoice</code> - Creating New Invoices &amp; Related Objects</h5>
<p>Given a hash of inputs, you can create new invoices on the fly using this syntax:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>invoice = Invoice.create(:customer =&gt; customer, :merchant =&gt; merchant, :status =&gt; "shipped", :items =&gt; [item1, item2, item3])</span></code></pre></td></tr></table></div></figure>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>invoice = Invoice.create(:customer =&gt; customer, :merchant =&gt; merchant, :status =&gt; "shipped",
</span><span class='line'> :items =&gt; [item1, item2, item3])</span></code></pre></td></tr></table></div></figure>

<p>Assuming that <code>customer</code>, <code>merchant</code>, and <code>item1</code>/<code>item2</code>/<code>item3</code> are instances of their respective classes.</p>

Expand All @@ -300,7 +302,9 @@ <h5><code>Invoice</code> - Creating New Invoices &amp; Related Objects</h5>
<p>Then, on such an invoice you can call:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">invoice</span><span class="o">.</span><span class="n">charge</span><span class="p">(</span><span class="ss">:credit_card_number</span> <span class="o">=&gt;</span> <span class="s2">&quot;4444333322221111&quot;</span><span class="p">,</span> <span class="ss">:credit_card_expiration</span> <span class="o">=&gt;</span> <span class="s2">&quot;10/13&quot;</span><span class="p">,</span> <span class="ss">:result</span> <span class="o">=&gt;</span> <span class="s2">&quot;success&quot;</span><span class="p">)</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">invoice</span><span class="o">.</span><span class="n">charge</span><span class="p">(</span><span class="ss">:credit_card_number</span> <span class="o">=&gt;</span> <span class="s2">&quot;4444333322221111&quot;</span><span class="p">,</span>
</span><span class='line'> <span class="ss">:credit_card_expiration</span> <span class="o">=&gt;</span> <span class="s2">&quot;10/13&quot;</span><span class="p">,</span> <span class="ss">:result</span> <span class="o">=&gt;</span> <span class="s2">&quot;success&quot;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>

<p>The objects created through this process would then affect calculations, finds, etc.</p>
Expand Down
2 changes: 1 addition & 1 deletion public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</url>
<url>
<loc>http://yoursite.com/projects/sales_engine.html</loc>
<lastmod>2012-03-27T13:48:19-04:00</lastmod>
<lastmod>2012-03-27T13:51:52-04:00</lastmod>
</url>
<url>
<loc>http://yoursite.com/topics/auth/authorization.html</loc>
Expand Down

0 comments on commit 2d59449

Please sign in to comment.