<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/popular/language/ruby</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 03:39:16 GMT</pubDate>
<item>
<title>(Ruby) http get - richardleonard</title>
<link>http://snipplr.com/view/96/http-get/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 30 Nov -0001 00:00:00 GMT</pubDate>
<guid>http://snipplr.com/view/96/http-get/</guid>
</item>
<item>
<title>(Ruby) Post form data - richardleonard</title>
<link>http://snipplr.com/view/92/post-form-data/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 30 Nov -0001 00:00:00 GMT</pubDate>
<guid>http://snipplr.com/view/92/post-form-data/</guid>
</item>
<item>
<title>(Ruby) Rails validate email - gdonald</title>
<link>http://snipplr.com/view/1248/rails-validate-email/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Sep 2006 13:18:02 GMT</pubDate>
<guid>http://snipplr.com/view/1248/rails-validate-email/</guid>
</item>
<item>
<title>(Ruby) Post snippet to Snipplr - gtcaz</title>
<link>http://snipplr.com/view/2044/post-snippet-to-snipplr/</link>
<description><![CDATA[ <p>Alternative bundle command for e (http://www.e-texteditor.com) or TextMate.

Replace YOUR_API_KEY_HERE with a valid API key -- you can find it on your Settings page (http://snipplr.com/settings/).

Changed the command to allow selection of language.  (Thanks, Tyler!)  Also it was unnecessary to escape entities when posting to Snipplr, so that caused problems.  Please let me know if you have any issues with or suggestions for this command.  If you're using TextMate, you'll need to alter the path to CocoaDialog, and you might as well use an environment variable for the API Key.

2/2/2007: Fixed a bug that prevented posting snippets with no tags.  Languages are now sorted alphabetically.</p> ]]></description>
<pubDate>Tue, 30 Jan 2007 20:26:49 GMT</pubDate>
<guid>http://snipplr.com/view/2044/post-snippet-to-snipplr/</guid>
</item>
<item>
<title>(Ruby) Ruby On Rails Form Helper with Image Submit Button - newtonapple</title>
<link>http://snipplr.com/view/866/ruby-on-rails-form-helper-with-image-submit-button/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Aug 2006 22:51:17 GMT</pubDate>
<guid>http://snipplr.com/view/866/ruby-on-rails-form-helper-with-image-submit-button/</guid>
</item>
<item>
<title>(Ruby) reading html from an external URL - aravet</title>
<link>http://snipplr.com/view/182/reading-html-from-an-external-url/</link>
<description><![CDATA[ <p>reference:
\n
http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html

http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html</p> ]]></description>
<pubDate>Wed, 30 Nov -0001 00:00:00 GMT</pubDate>
<guid>http://snipplr.com/view/182/reading-html-from-an-external-url/</guid>
</item>
<item>
<title>(Ruby) Simple Blind Up-Down - tjstankus</title>
<link>http://snipplr.com/view/596/simple-blind-updown/</link>
<description><![CDATA[ <p>The key here is display:none being in the style attribute of the affected div. It will not work if it's in a separate CSS file.</p> ]]></description>
<pubDate>Thu, 27 Jul 2006 22:04:59 GMT</pubDate>
<guid>http://snipplr.com/view/596/simple-blind-updown/</guid>
</item>
<item>
<title>(Ruby) Validate a Credit Card Number - chrisaiv</title>
<link>http://snipplr.com/view/3959/validate-a-credit-card-number/</link>
<description><![CDATA[ <p>Download the Credit Card Library from Lucas Carlson
user$ sudo gem install creditcard</p> ]]></description>
<pubDate>Sun, 21 Oct 2007 18:37:34 GMT</pubDate>
<guid>http://snipplr.com/view/3959/validate-a-credit-card-number/</guid>
</item>
<item>
<title>(Ruby) ActionMailer - ryanprel</title>
<link>http://snipplr.com/view/2148/actionmailer/</link>
<description><![CDATA[ <p>Sick of writing almost the same thing over and over in your ActionMailer classes? Skip all that, and use something like this.


(If you have a configuration loaded into a constant, you could just replace the defaults above and use your app's defaults to make it all cleaner, of course)

And then from your controller you can do stuff like this:</p> ]]></description>
<pubDate>Thu, 08 Feb 2007 13:00:34 GMT</pubDate>
<guid>http://snipplr.com/view/2148/actionmailer/</guid>
</item>
<item>
<title>(Ruby) Strip HTML Tags - gtcaz</title>
<link>http://snipplr.com/view/2097/strip-html-tags/</link>
<description><![CDATA[ <p>This replaces the PHP-based function in the HTML bundle.  You need to add two files to your bundle's Support/lib folder (create the directories if they're not present):

http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb?format=raw
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb?format=raw</p> ]]></description>
<pubDate>Fri, 02 Feb 2007 15:28:37 GMT</pubDate>
<guid>http://snipplr.com/view/2097/strip-html-tags/</guid>
</item>
<item>
<title>(Ruby) Get one of your snippets from Snipplr - gtcaz</title>
<link>http://snipplr.com/view/2039/get-one-of-your-snippets-from-snipplr/</link>
<description><![CDATA[ <p>This command allows you to browse your snippet collection on Snipplr and retrieve them into e.  Requires the installation of the wxCocoaDialog exe in the /Support/bin subdirectory.

Replace YOUR_API_KEY_HERE with the API key -- you can find it on your Settings page (http://snipplr.com/settings/).

Update 1/31/2007: I found escaping the $ was necessary to prevent the snippet engine from eating the variable.
Update 2/01/2007: Use the standard library function for escaping the snippet (instead of my own gsub() regex.
Update 2/02/2007: Add error checking code; handle empty accounts a bit more gracefully (and informatively).</p> ]]></description>
<pubDate>Tue, 30 Jan 2007 15:26:51 GMT</pubDate>
<guid>http://snipplr.com/view/2039/get-one-of-your-snippets-from-snipplr/</guid>
</item>
<item>
<title>(Ruby) Remote Form Tag - jordanbrock</title>
<link>http://snipplr.com/view/2054/remote-form-tag/</link>
<description><![CDATA[ <p>An example ajax form tag</p> ]]></description>
<pubDate>Thu, 01 Feb 2007 00:44:04 GMT</pubDate>
<guid>http://snipplr.com/view/2054/remote-form-tag/</guid>
</item>
<item>
<title>(Ruby) Tableless Model - vanne</title>
<link>http://snipplr.com/view/1849/tableless-model/</link>
<description><![CDATA[ <p>This is useful for using ActiveRecord validations without the ActiveRecord DB dependencies, this snippet is meant to be used with Textmate... create this in models/name_of_your_model to use.</p> ]]></description>
<pubDate>Wed, 27 Dec 2006 08:31:49 GMT</pubDate>
<guid>http://snipplr.com/view/1849/tableless-model/</guid>
</item>
<item>
<title>(Ruby) Running RSpec for Rails from TextMate - Catfish</title>
<link>http://snipplr.com/view/131/running-rspec-for-rails-from-textmate/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 30 Jun 2006 07:00:55 GMT</pubDate>
<guid>http://snipplr.com/view/131/running-rspec-for-rails-from-textmate/</guid>
</item>
<item>
<title>(Ruby) Test for required attributes - tjstankus</title>
<link>http://snipplr.com/view/291/test-for-required-attributes/</link>
<description><![CDATA[ <p>A fairly DRY way to test for required attributes of a model. It's sort of an alternative to fixtures. It breaks the one-assertion-per-test rule that some people favor. Drop in your unit test and edit as necessary.

A better (yet not quite perfect) approach:
http://johnwilger.com/articles/2005/12/07/a-bit-of-dryness-for-unit-tests-in-rails</p> ]]></description>
<pubDate>Sat, 08 Jul 2006 20:17:13 GMT</pubDate>
<guid>http://snipplr.com/view/291/test-for-required-attributes/</guid>
</item>
<item>
<title>(Ruby) factory girl example - jnunemaker</title>
<link>http://snipplr.com/view/9350/factory-girl-example/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 28 Oct 2008 23:58:50 GMT</pubDate>
<guid>http://snipplr.com/view/9350/factory-girl-example/</guid>
</item>
<item>
<title>(Ruby) facebook chat - rchk</title>
<link>http://snipplr.com/view/6246/facebook-chat/</link>
<description><![CDATA[ <p>requires mechanize and json gems.</p> ]]></description>
<pubDate>Thu, 15 May 2008 14:24:48 GMT</pubDate>
<guid>http://snipplr.com/view/6246/facebook-chat/</guid>
</item>
<item>
<title>(Ruby) Display image in Link_to - ryanprel</title>
<link>http://snipplr.com/view/2147/display-image-in-linkto/</link>
<description><![CDATA[ <p>Displays a image inside link_to instead of text.</p> ]]></description>
<pubDate>Thu, 08 Feb 2007 12:59:21 GMT</pubDate>
<guid>http://snipplr.com/view/2147/display-image-in-linkto/</guid>
</item>
<item>
<title>(Ruby) rss2 template - rduv</title>
<link>http://snipplr.com/view/1366/rss2-template/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 10 Oct 2006 01:32:02 GMT</pubDate>
<guid>http://snipplr.com/view/1366/rss2-template/</guid>
</item>
<item>
<title>(Ruby) Ruby sudoku solver - gdonald</title>
<link>http://snipplr.com/view/1226/ruby-sudoku-solver/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Sep 2006 11:00:49 GMT</pubDate>
<guid>http://snipplr.com/view/1226/ruby-sudoku-solver/</guid>
</item>
<item>
<title>(Ruby) Import SVN to Dreamhost - miklophone</title>
<link>http://snipplr.com/view/1001/import-svn-to-dreamhost/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 02 Sep 2006 05:43:11 GMT</pubDate>
<guid>http://snipplr.com/view/1001/import-svn-to-dreamhost/</guid>
</item>
<item>
<title>(Ruby) date humanize - ringo</title>
<link>http://snipplr.com/view/289/date-humanize/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 08 Jul 2006 17:20:23 GMT</pubDate>
<guid>http://snipplr.com/view/289/date-humanize/</guid>
</item>
<item>
<title>(Ruby) Snipplr API ruby library - dbug13</title>
<link>http://snipplr.com/view/11211/snipplr-api-ruby-library/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 15 Jan 2009 13:47:57 GMT</pubDate>
<guid>http://snipplr.com/view/11211/snipplr-api-ruby-library/</guid>
</item>
<item>
<title>(Ruby) Get OSX Leopard Battery Stats For Your Laptop - gtcaz</title>
<link>http://snipplr.com/view/5758/get-osx-leopard-battery-stats-for-your-laptop/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 09 Apr 2008 15:08:02 GMT</pubDate>
<guid>http://snipplr.com/view/5758/get-osx-leopard-battery-stats-for-your-laptop/</guid>
</item>
<item>
<title>(Ruby) How to iterate through an array in Ruby - chrisaiv</title>
<link>http://snipplr.com/view/3963/how-to-iterate-through-an-array-in-ruby/</link>
<description><![CDATA[ <p>For all of you actionscripters out there, this example is the Ruby equivalent of writing for(i in array){trace(i);} or for(i = 0; i < array.length; i++){trace(i);}</p> ]]></description>
<pubDate>Sun, 21 Oct 2007 20:01:24 GMT</pubDate>
<guid>http://snipplr.com/view/3963/how-to-iterate-through-an-array-in-ruby/</guid>
</item>
</channel>
</rss>