<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 19:14:42 +0000</lastBuildDate>
    <item>
      <title>(Ruby) Rendering Partial Template while Passing Variable - wackimonki</title>
      <link>https://snipplr.com/view/2219/rendering-partial-template-while-passing-variable</link>
      <description>&lt;p&gt;Renders the partial template called 'cart', sends along local variable @cart, this will be known locally using the same name as the partial, 'cart'.&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 22:08:26 UTC</pubDate>
      <guid>https://snipplr.com/view/2219/rendering-partial-template-while-passing-variable</guid>
    </item>
    <item>
      <title>(Ruby) Testing If Variable is Empty (nil) - wackimonki</title>
      <link>https://snipplr.com/view/2218/testing-if-variable-is-empty-nil</link>
      <description>&lt;p&gt;The code tests if session[:counter] exists. If you leave out the all important '?', it will fail with an error.&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 19:55:48 UTC</pubDate>
      <guid>https://snipplr.com/view/2218/testing-if-variable-is-empty-nil</guid>
    </item>
    <item>
      <title>(Ruby) Totalling All of a Variable - wackimonki</title>
      <link>https://snipplr.com/view/2217/totalling-all-of-a-variable</link>
      <description>&lt;p&gt;This will add up all the prices and return it?&#13;
What does |item| mean exactly?&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 19:04:12 UTC</pubDate>
      <guid>https://snipplr.com/view/2217/totalling-all-of-a-variable</guid>
    </item>
    <item>
      <title>(Ruby) Redirect from One Method to Another - wackimonki</title>
      <link>https://snipplr.com/view/2215/redirect-from-one-method-to-another</link>
      <description>&lt;p&gt;Redirects from one method to another in a controller. This is handy when there's an error, and you need to go back to index page, or for other purposes.&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 18:34:17 UTC</pubDate>
      <guid>https://snipplr.com/view/2215/redirect-from-one-method-to-another</guid>
    </item>
    <item>
      <title>(Ruby) Adding Button to View - wackimonki</title>
      <link>https://snipplr.com/view/2214/adding-button-to-view</link>
      <description>&lt;p&gt;Adds a button in view, which triggers a method.&#13;
&#13;
"Empty cart" is the button name&#13;
empty_cart is the method name&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 18:29:08 UTC</pubDate>
      <guid>https://snipplr.com/view/2214/adding-button-to-view</guid>
    </item>
    <item>
      <title>(Ruby) Catching Error to be Displayed on Redirected Page - wackimonki</title>
      <link>https://snipplr.com/view/2213/catching-error-to-be-displayed-on-redirected-page</link>
      <description>&lt;p&gt;Catches an exception error, uses a technique called flash to display error on another page.&#13;
&#13;
The Ruby on Rails code needs to be in a controller.&#13;
&#13;
The rhtml code needs to be in the index layout.&lt;/p&gt;</description>
      <pubDate>Mon, 26 Feb 2007 17:58:12 UTC</pubDate>
      <guid>https://snipplr.com/view/2213/catching-error-to-be-displayed-on-redirected-page</guid>
    </item>
  </channel>
</rss>
