<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mexpolk</title>
	<atom:link href="http://mexpolk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mexpolk.wordpress.com</link>
	<description>Ruby, Ruby on Rails, *nix howtos by Ivan Torres</description>
	<lastBuildDate>Wed, 12 Aug 2009 11:36:47 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mexpolk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4c66ec5398424e8b00596432d88fede9?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mexpolk</title>
		<link>http://mexpolk.wordpress.com</link>
	</image>
			<item>
		<title>Improving the Usability of Your Ruby on Rails Applications</title>
		<link>http://mexpolk.wordpress.com/2009/08/12/improving-the-usability-of-your-ruby-on-rails-applications/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/12/improving-the-usability-of-your-ruby-on-rails-applications/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 11:36:47 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=106</guid>
		<description><![CDATA[

	
	
	
	


Posted in Uncategorized       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=106&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style='text-align:center; display: block;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=6063550&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=6063550&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
</object>
</span></p>
Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=106&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/12/improving-the-usability-of-your-ruby-on-rails-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu (Hardy): Install Apache 2 Server</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/ubuntu-hardy-install-apache-2-server/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/ubuntu-hardy-install-apache-2-server/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 00:04:17 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Hardy]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=87</guid>
		<description><![CDATA[Setting up Apache 2 server on Ubuntu Hardy is pretty easy. 


sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert


Note:
I choose apache2-mpm-prefork (single thread) over apache2-mpm-worker (multi-threaded requests). This is because mod_rails may work with apache2-mpm-worker, but is only currently tested to work with apache2-mpm-prefork.
ServerName
Edit your apache configuration file:


$ vim /etc/apache2/apache2.conf


At the end of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=87&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Setting up Apache 2 server on Ubuntu Hardy is pretty easy. </p>
<div class="CodeRay">
<div class="code">
<pre>sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert</pre>
</div>
</div>
<h4>Note:</h4>
<p>I choose apache2-mpm-prefork (single thread) over apache2-mpm-worker (multi-threaded requests). This is because mod_rails may work with apache2-mpm-worker, but is only currently tested to work with apache2-mpm-prefork.</p>
<h3>ServerName</h3>
<p>Edit your apache configuration file:</p>
<div class="CodeRay">
<div class="code">
<pre>$ vim /etc/apache2/apache2.conf</pre>
</div>
</div>
<p>At the end of the file add the following:</p>
<div class="CodeRay">
<div class="code">
<pre>ServerName your_server_name</pre>
</div>
</div>
<p>And restart your server:</p>
<div class="CodeRay">
<div class="code">
<pre>$ sudo apache2ctl graceful</pre>
</div>
</div>
<h4>Note:</h4>
<p>If you get the following error when restarting Apache it means that you didn&#8217;t succeed in setting the ServerName:</p>
<div class="CodeRay">
<div class="code">
<pre>apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName</pre>
</div>
</div>
<h3>Test</h3>
<p>Start your prefered browser and open your server ip address (e.g. http://127.0.0.1), you should see something like this: </p>
<p><img src="http://mexpolk.files.wordpress.com/2009/08/screenshot.png?w=385&#038;h=198" alt="It Works!" title="It Works!" width="385" height="198" class="alignnone size-full wp-image-97" /></p>
<p>Or use curl (command line is always better):</p>
<div class="CodeRay">
<div class="code">
<pre>$ curl http://127.0.0.1</pre>
</div>
</div>
<p>You should see:</p>
<div class="CodeRay">
<div class="code">
<pre><span class="ta">&lt;html&gt;</span><span class="ta">&lt;body&gt;</span><span class="ta">&lt;h1&gt;</span>It works!<span class="ta">&lt;/h1&gt;</span><span class="ta">&lt;/body&gt;</span><span class="ta">&lt;/html&gt;</span></pre>
</div>
</div>
<p>It Works!!!</p>
Posted in Howtos, Servers, Ubuntu Tagged: apache, Hardy, howto, ubuntu <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=87&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/ubuntu-hardy-install-apache-2-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>

		<media:content url="http://mexpolk.files.wordpress.com/2009/08/screenshot.png" medium="image">
			<media:title type="html">It Works!</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby: Mixin Template</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/ruby-mixin-template/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/ruby-mixin-template/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:39:10 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mixins]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=84</guid>
		<description><![CDATA[This is the basic structure I use to create a mixin in Ruby:


# = Mixin Template
# == Usage
# ActionController::Base.send :include, MixinModuleName

module MixinModuleName

  def self.included(recipient)
    recipient.extend(ClassMethods)
    recipient.class_eval do
      include InstanceMethods
    end
  end

  module InstanceMethods
  end

  module ClassMethods
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=84&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the basic structure I use to create a mixin in Ruby:</p>
<div class="CodeRay">
<div class="code">
<pre><span class="c"># = Mixin Template</span>
<span class="c"># == Usage</span>
<span class="c"># ActionController::Base.send :include, MixinModuleName</span>

<span class="r">module</span> <span class="cl">MixinModuleName</span>

  <span class="r">def</span> <span class="pc">self</span>.included(recipient)
    recipient.extend(<span class="co">ClassMethods</span>)
    recipient.class_eval <span class="r">do</span>
      include <span class="co">InstanceMethods</span>
    <span class="r">end</span>
  <span class="r">end</span>

  <span class="r">module</span> <span class="cl">InstanceMethods</span>
  <span class="r">end</span>

  <span class="r">module</span> <span class="cl">ClassMethods</span>
  <span class="r">end</span>

<span class="r">end</span></pre>
</div>
</div>
Posted in Programming, Ruby Tagged: mixins, ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=84&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/ruby-mixin-template/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>Git: Creating a Remote Branch (and track it locally)</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/git-creating-a-remote-branch-and-track-it-locally/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/git-creating-a-remote-branch-and-track-it-locally/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:34:19 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=81</guid>
		<description><![CDATA[Required steps to create and track locally a remote branch with git:


# Create new remote branch
git push origin origin:refs/heads/new_branch_name

# Make sure everything is updated
git fetch origin

# Check your branch has been created
git branch -r

# Track a remote branch
git branch --track new_branch_name origin/new_branch_name

# Checkout remote branch
git checkout new_branch_name


Posted in git Tagged: git     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=81&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Required steps to create and track locally a remote branch with git:</p>
<div class="CodeRay">
<div class="code">
<pre># Create new remote branch
git push origin origin:refs/heads/new_branch_name

# Make sure everything is updated
git fetch origin

# Check your branch has been created
git branch -r

# Track a remote branch
git branch --track new_branch_name origin/new_branch_name

# Checkout remote branch
git checkout new_branch_name</pre>
</div>
</div>
Posted in git Tagged: git <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=81&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/git-creating-a-remote-branch-and-track-it-locally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>Git: Undo commit</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/git-undo-commit/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/git-undo-commit/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:29:41 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=76</guid>
		<description><![CDATA[Sometimes, when the caffeine no longer works, you can make a mistake on a commit. Either you have second thoughts about your commit message, you just forgot to track new project files, or whatever the reasons are you can always undo your last commit (as long you don&#8217;t push it to origin repository):


$ git reset [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=76&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometimes, when the caffeine no longer works, you can make a mistake on a commit. Either you have second thoughts about your commit message, you just forgot to track new project files, or whatever the reasons are you can always undo your last commit (as long you don&#8217;t push it to origin repository):</p>
<div class="CodeRay">
<div class="code">
<pre>$ git reset --soft HEAD^</pre>
</div>
</div>
Posted in git Tagged: git <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=76&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/git-undo-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>Gem: Simple Navigation (Navigation menu builder for Ruby on Rails)</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/simple-navigation-navigation-menu-builder-for-ruby-on-rails/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/simple-navigation-navigation-menu-builder-for-ruby-on-rails/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 11:57:03 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[gems]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=68</guid>
		<description><![CDATA[I&#8217;ve just released my new gem simple_navigation. This gem help&#8217;s you to create a navigation menu for your Ruby on Rails application.
Installation
Edit your config/environment.rb to setup simple_navigation gem:


config.gem &#34;mexpolk-simple_navigation&#34;,
    :lib =&#62; &#34;simple_navigation&#34;,
    :source =&#62; &#34;http://gems.github.com&#34;


And from the command line, install the plugin:


rake gems:install


Usage
To create your menus create a new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=68&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve just released my new gem <a href="http://github.com/mexpolk/simple_navigation/tree/master">simple_navigation</a>. This gem help&#8217;s you to create a navigation menu for your Ruby on Rails application.</p>
<h3>Installation</h3>
<p>Edit your config/environment.rb to setup simple_navigation gem:</p>
<div class="CodeRay">
<div class="code">
<pre>config.gem <span class="s"><span class="dl">&quot;</span><span class="k">mexpolk-simple_navigation</span><span class="dl">&quot;</span></span>,
    <span class="sy">:lib</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation</span><span class="dl">&quot;</span></span>,
    <span class="sy">:source</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">http://gems.github.com</span><span class="dl">&quot;</span></span></pre>
</div>
</div>
<p>And from the command line, install the plugin:</p>
<div class="CodeRay">
<div class="code">
<pre>rake gems:install</pre>
</div>
</div>
<h3>Usage</h3>
<p>To create your menus create a new file named config/initializers/simple_navigation.rb like this:</p>
<div class="CodeRay">
<div class="code">
<pre><span class="co">SimpleNavigation</span>::<span class="co">Builder</span>.config <span class="r">do</span> |map|
  map.navigation <span class="sy">:default</span> <span class="r">do</span> |navigation|

    <span class="c"># Root menu without child elements (menus) that points to /dashboard</span>
    navigation.menu <span class="sy">:home</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">home</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span>}

    <span class="c"># Root menu with child menus without anchor link</span>
    navigation.menu <span class="sy">:contacts</span> <span class="r">do</span> |contacts|

      <span class="c"># Child menu with many possible urls (or many controllers and actions)</span>
      contacts.menu <span class="sy">:list</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">contacts</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |contact_list|

        <span class="c"># This menu will marked as current when you're on the following</span>
        <span class="c"># controllers and actions (including the controller and action</span>
        <span class="c"># specified in the :url option):</span>
        contact_list.connect <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">contacts</span><span class="dl">&quot;</span></span> <span class="c"># ...current on any action from this controller</span>
        contact_list.connect <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">people</span><span class="dl">&quot;</span></span>, <span class="sy">:except</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">new</span><span class="dl">&quot;</span></span>
        contact_list.connect <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">companies</span><span class="dl">&quot;</span></span>, <span class="sy">:except</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">new</span><span class="dl">&quot;</span></span>

      <span class="r">end</span>

      <span class="c"># Another submenu that points to /person/new</span>
      contacts.menu <span class="sy">:new_person</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">people</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">new</span><span class="dl">&quot;</span></span> }

      <span class="c"># Another submenu that points to /company/new</span>
      contacts.menu <span class="sy">:new_company</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">companies</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">new</span><span class="dl">&quot;</span></span> }

    <span class="r">end</span>

    <span class="c"># Another root menu with nested submenus</span>
    navigation.tab <span class="sy">:admin</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">users</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |admin|
      admin.menu <span class="sy">:users</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">users</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |users|
        users.menu <span class="sy">:reports</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">user_reports</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |reports|
          reports.menu <span class="sy">:activity</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">user_reports</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">activity</span><span class="dl">&quot;</span></span> }
          reports.menu <span class="sy">:login_atempts</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">user_reports</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">login_atempts</span><span class="dl">&quot;</span></span> }
        <span class="r">end</span>
        users.menu <span class="sy">:new_user</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">users</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">new</span><span class="dl">&quot;</span></span> }
      <span class="r">end</span>
    <span class="r">end</span>

  <span class="r">end</span>
<span class="r">end</span>
</pre>
</div>
</div>
<p>Finally, to render you newly created menu called :default, in your default layout (layout/application.erb): </p>
<div class="CodeRay">
<div class="code">
<pre><span class="il"><span class="idl">&lt;%=</span> simple_navigation <span class="sy">:default</span> <span class="idl">%&gt;</span></span></pre>
</div>
</div>
<h3>Ready for Internationalization (i18n)</h3>
<p>If you want to use internationalization in your menus, set the option :i18n =&gt; true like this: </p>
<div class="CodeRay">
<div class="code">
<pre><span class="co">SimpleNavigation</span>::<span class="co">Builder</span>.config <span class="r">do</span> |map|
  map.navigation <span class="sy">:default</span>, <span class="sy">:i18n</span> =&gt; <span class="pc">true</span> <span class="r">do</span> |navigation|
  ...
  <span class="r">end</span>
<span class="r">end</span></pre>
</div>
</div>
<p>And add to your config/locales files (e.g. es-MX.yml) the following: </p>
<div class="CodeRay">
<div class="code">
<pre><span class="er">es-MX</span>:
  <span class="ke">simple_navigation</span>:
    <span class="ke">default</span>:                          <span class="c"># The name of your navigation menu</span>
      <span class="ke">home</span>:                           <span class="c"># The name of your root menu</span>
        <span class="ke">title</span>: <span class="s"><span class="dl">&quot;</span><span class="k">Inicio</span><span class="dl">&quot;</span></span>               <span class="c"># The translated title for your root menu</span>
        <span class="ke">menus</span>:
          <span class="ke">index</span>:
            <span class="ke">title</span>: <span class="s"><span class="dl">&quot;</span><span class="k">Panel de Control</span><span class="dl">&quot;</span></span> <span class="c"># The title for index action child menu</span>
          <span class="ke">new</span>:
            <span class="ke">title</span>: <span class="s"><span class="dl">&quot;</span><span class="k">Nueva Página</span><span class="dl">&quot;</span></span>     <span class="c"># The title for new action child menu</span>
</pre>
</div>
</div>
<h3>Sample Application</h3>
<p>I have a sample application at <a href="http://github.com/mexpolk/simple_navigation_example/tree/master">GitHub</a> so you can see it work. <a href="http://github.com/mexpolk/simple_navigation_example/tree/master">This</a> application has the following configuration (config/initializers/simple_navigation.rb):</p>
<div class="CodeRay">
<div class="code">
<pre><span class="co">SimpleNavigation</span>::<span class="co">Builder</span>.config <span class="r">do</span> |map|
  map.navigation <span class="sy">:default</span>, <span class="sy">:i18n</span> =&gt; <span class="pc">true</span> <span class="r">do</span> |navigation|
    navigation.menu <span class="sy">:home</span>, <span class="s"><span class="dl">&quot;</span><span class="k">Wellcome</span><span class="dl">&quot;</span></span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">home</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |home|
      home.menu <span class="sy">:settings</span>, <span class="s"><span class="dl">&quot;</span><span class="k">Appliction Settings</span><span class="dl">&quot;</span></span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">home</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">settings</span><span class="dl">&quot;</span></span>}
    <span class="r">end</span>
    navigation.menu <span class="sy">:pages</span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">pages</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">index</span><span class="dl">&quot;</span></span> } <span class="r">do</span> |pages|
      pages.menu <span class="sy">:page_one</span>, <span class="s"><span class="dl">&quot;</span><span class="k">One</span><span class="dl">&quot;</span></span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">pages</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">one</span><span class="dl">&quot;</span></span> }
      pages.menu <span class="sy">:page_two</span>, <span class="s"><span class="dl">&quot;</span><span class="k">Two</span><span class="dl">&quot;</span></span>, <span class="sy">:url</span> =&gt; { <span class="sy">:controller</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">pages</span><span class="dl">&quot;</span></span>, <span class="sy">:action</span> =&gt; <span class="s"><span class="dl">&quot;</span><span class="k">two</span><span class="dl">&quot;</span></span> }
    <span class="r">end</span>
  <span class="r">end</span>
<span class="r">end</span></pre>
</div>
</div>
<p>When you render the navigation menu, it creates an unordered list like this:</p>
<div class="CodeRay">
<div class="code">
<pre><span class="ta">&lt;ul</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation</span><span class="dl">&quot;</span></span> <span class="an">depth</span>=<span class="s"><span class="dl">&quot;</span><span class="k">0</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
  <span class="ta">&lt;li</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_home</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">menu</span><span class="dl">&quot;</span></span> <span class="an">drop_down</span>=<span class="s"><span class="dl">&quot;</span><span class="k">true</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
    <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">/home</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Wellcome<span class="ta">&lt;/a&gt;</span>
    <span class="ta">&lt;ul</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_home_menus</span><span class="dl">&quot;</span></span> <span class="an">depth</span>=<span class="s"><span class="dl">&quot;</span><span class="k">1</span><span class="dl">&quot;</span></span> <span class="an">style</span>=<span class="s"><span class="dl">&quot;</span><span class="k">display: none;</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
      <span class="ta">&lt;li</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_home_menus_settings</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">menu</span><span class="dl">&quot;</span></span> <span class="an">drop_down</span>=<span class="s"><span class="dl">&quot;</span><span class="k">false</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
        <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">/home/settings</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Appliction Settings<span class="ta">&lt;/a&gt;</span>
      <span class="ta">&lt;/li&gt;</span>
    <span class="ta">&lt;/ul&gt;</span>
  <span class="ta">&lt;/li&gt;</span>
  <span class="ta">&lt;li</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_pages</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">menu current_child</span><span class="dl">&quot;</span></span> <span class="an">drop_down</span>=<span class="s"><span class="dl">&quot;</span><span class="k">true</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
    <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">/pages</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Pages<span class="ta">&lt;/a&gt;</span>
    <span class="ta">&lt;ul</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_pages_menus</span><span class="dl">&quot;</span></span> <span class="an">depth</span>=<span class="s"><span class="dl">&quot;</span><span class="k">1</span><span class="dl">&quot;</span></span> <span class="an">style</span>=<span class="s"><span class="dl">&quot;</span><span class="k">display: none;</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
      <span class="ta">&lt;li</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_pages_menus_page_one</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">menu</span><span class="dl">&quot;</span></span> <span class="an">drop_down</span>=<span class="s"><span class="dl">&quot;</span><span class="k">false</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
        <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">/pages/one</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>One<span class="ta">&lt;/a&gt;</span>
      <span class="ta">&lt;/li&gt;</span>
      <span class="ta">&lt;li</span> <span class="an">id</span>=<span class="s"><span class="dl">&quot;</span><span class="k">simple_navigation_default_menus_pages_menus_page_two</span><span class="dl">&quot;</span></span> <span class="an">class</span>=<span class="s"><span class="dl">&quot;</span><span class="k">menu current</span><span class="dl">&quot;</span></span> <span class="an">drop_down</span>=<span class="s"><span class="dl">&quot;</span><span class="k">false</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>
        <span class="ta">&lt;a</span> <span class="an">href</span>=<span class="s"><span class="dl">&quot;</span><span class="k">/pages/two</span><span class="dl">&quot;</span></span><span class="ta">&gt;</span>Two<span class="ta">&lt;/a&gt;</span>
      <span class="ta">&lt;/li&gt;</span>
    <span class="ta">&lt;/ul&gt;</span>
  <span class="ta">&lt;/li&gt;</span>
<span class="ta">&lt;/ul&gt;</span></pre>
</div>
</div>
<p>This result, with a little help of our friends CSS+Javascript will result in something like this:</p>
<div id="attachment_70" class="wp-caption alignnone" style="width: 496px"><img src="http://mexpolk.files.wordpress.com/2009/08/screenshot-simple-navigation-sample-application-mozilla-firefox1.png?w=486&#038;h=373" alt="Screenshot-Simple Navigation - Sample Application - Mozilla Firefox" title="Simple Navigation in Action!" width="486" height="373" class="size-full wp-image-70" /><p class="wp-caption-text">Screenshot-Simple Navigation - Sample Application - Mozilla Firefox</p></div>
<p>Check the <a href="http://github.com/mexpolk/simple_navigation_example/tree/master">Simple Navigation Example</a> yourself&#8230; Hope you enjoy it!</p>
Posted in Programming, Ruby on Rails Tagged: gems, Ruby on Rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=68&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/simple-navigation-navigation-menu-builder-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>

		<media:content url="http://mexpolk.files.wordpress.com/2009/08/screenshot-simple-navigation-sample-application-mozilla-firefox1.png" medium="image">
			<media:title type="html">Simple Navigation in Action!</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby: Convert Number to Words (Numerical)</title>
		<link>http://mexpolk.wordpress.com/2009/08/08/ruby-convert-number-to-words-numerical/</link>
		<comments>http://mexpolk.wordpress.com/2009/08/08/ruby-convert-number-to-words-numerical/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 11:07:45 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[numerical]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=66</guid>
		<description><![CDATA[Recently I&#8217;ve published my new gem NumberToWords. This plugin/gem will override Ruby&#8217;s Numeric class adding a new method called to_words. For now, it only works for Spanish.
Sample usage:


require 'rubygems'
require 'number_to_words'
5678.to_words
=&#62; “cinco mil seiscientos setenta y ocho”


Another common usage is for describing currency quantities:


number = 4567.90
=&#62; 4567.9
number.to_words.capitalize &#60;&#60; ' pesos ' &#60;&#60; (number.to_s.split('.')[1] &#124;&#124; 0).rjust(2,'0')
=&#62; &#34;Cuatro [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=66&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently I&#8217;ve published my new gem <a href="http://github.com/mexpolk/number_to_words/tree/master">NumberToWords</a>. This plugin/gem will override Ruby&#8217;s Numeric class adding a new method called to_words. For now, it only works for Spanish.</p>
<p>Sample usage:</p>
<div class="CodeRay">
<div class="code">
<pre>require <span class="s"><span class="dl">'</span><span class="k">rubygems</span><span class="dl">'</span></span>
require <span class="s"><span class="dl">'</span><span class="k">number_to_words</span><span class="dl">'</span></span>
<span class="i">5678</span>.to_words
=&gt; <span class="er">“</span>cinco mil seiscientos setenta y ocho”</pre>
</div>
</div>
<p>Another common usage is for describing currency quantities:</p>
<div class="CodeRay">
<div class="code">
<pre>number = <span class="fl">4567.90</span>
=&gt; <span class="fl">4567.9</span>
number.to_words.capitalize &lt;&lt; <span class="s"><span class="dl">'</span><span class="k"> pesos </span><span class="dl">'</span></span> &lt;&lt; (number.to_s.split(<span class="s"><span class="dl">'</span><span class="k">.</span><span class="dl">'</span></span>)[<span class="i">1</span>] || <span class="i">0</span>).rjust(<span class="i">2</span>,<span class="s"><span class="dl">'</span><span class="k">0</span><span class="dl">'</span></span>)
=&gt; <span class="s"><span class="dl">&quot;</span><span class="k">Cuatro mil quinientos sesenta y siete pesos 09/100 M.N.</span><span class="dl">&quot;</span></span></pre>
</div>
</div>
<p>http://github.com/mexpolk/number_to_words/tree/master</p>
<p>Happy Hacking!</p>
Posted in Programming, Ruby Tagged: gems, numerical, ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=66&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2009/08/08/ruby-convert-number-to-words-numerical/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>GEdit: Snippets for Ruby on Rails</title>
		<link>http://mexpolk.wordpress.com/2008/09/23/gedit-snippets-for-ruby-on-rails/</link>
		<comments>http://mexpolk.wordpress.com/2008/09/23/gedit-snippets-for-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 07:40:31 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[GEdit]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=50</guid>
		<description><![CDATA[I&#8217;ve just created a new GitHub repo with GEdit snippets for Ruby on Rails. Any suggestions and comments are welcome. To install them simply copy the xml files to your ~/.gnome2/gedit/snippets directory.
Refs:
GEdit
GEdit Snippets Plugin
Posted in GEdit, Ruby on Rails Tagged: GEdit, Ruby on Rails, Snippets      <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=50&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve just created a new <a href="http://github.com/mexpolk">GitHub</a> repo with GEdit <a href="http://github.com/mexpolk/gedit_snippets/tree/master">snippets</a> for Ruby on Rails. Any suggestions and comments are welcome. To install them simply copy the xml files to your ~/.gnome2/gedit/snippets directory.</p>
<p><strong>Refs:</strong><br />
<a href="http://www.gnome.org/projects/gedit/">GEdit</a><br />
<a href="http://live.gnome.org/Gedit/Plugins/Snippets">GEdit Snippets Plugin</a></p>
Posted in GEdit, Ruby on Rails Tagged: GEdit, Ruby on Rails, Snippets <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=50&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2008/09/23/gedit-snippets-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu: Disable That Annoying Touchpad Click</title>
		<link>http://mexpolk.wordpress.com/2008/07/21/ubuntu-disable-that-annoying-touchpad-click/</link>
		<comments>http://mexpolk.wordpress.com/2008/07/21/ubuntu-disable-that-annoying-touchpad-click/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 22:01:14 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[click]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=37</guid>
		<description><![CDATA[In my opinion, one of the worse inventions since &#8220;PC&#8221;, is the annoying (and I&#8217;m been respectful) Touchpad. Not only it takes you out of your home row (keyboard), or the fact that you need like two passes for reaching corners. But because it really &#38;*^#$%^*$ annoys me when typing accidentally make a click.
Lucky me&#8230; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=37&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my opinion, one of the worse inventions since &#8220;PC&#8221;, is the annoying (and I&#8217;m been respectful) Touchpad. Not only it takes you out of your home row (keyboard), or the fact that you need like two passes for reaching corners. But because it really &amp;*^#$%^*$ annoys me when typing accidentally make a click.</p>
<p>Lucky me&#8230; there&#8217;s a way to disable Touchpad-Click. Simply go to System &gt; Preferences &gt; Mouse, click on Touchpad tab, and uncheck: Ennable mouse clicks with touchpad.</p>
<p><a href="http://mexpolk.files.wordpress.com/2008/07/screenshot-mouse-preferences.png"><img class="alignnone size-medium wp-image-38" src="http://mexpolk.files.wordpress.com/2008/07/screenshot-mouse-preferences.png?w=237&#038;h=299" alt="" width="237" height="299" /></a></p>
<p>So long Touchpad-click!!!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mexpolk.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mexpolk.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=37&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2008/07/21/ubuntu-disable-that-annoying-touchpad-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>

		<media:content url="http://mexpolk.files.wordpress.com/2008/07/screenshot-mouse-preferences.png?w=237" medium="image" />
	</item>
		<item>
		<title>Git: Adding a Ruby on Rails Project to Git</title>
		<link>http://mexpolk.wordpress.com/2008/06/10/adding_a_ruby_on_rails_project_to_git/</link>
		<comments>http://mexpolk.wordpress.com/2008/06/10/adding_a_ruby_on_rails_project_to_git/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:32:33 +0000</pubDate>
		<dc:creator>Ivan Torres</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[source management system]]></category>

		<guid isPermaLink="false">http://mexpolk.wordpress.com/?p=32</guid>
		<description><![CDATA[Here&#8217;s how to add a recently created Ruby on Rails project to git:
1. Create your new project:


$ rails -d mysql project_name


2. Create some .gitignore empty files so you save the entire structure of your project (git doesn&#8217;t include empty folders):


$ touch db/.gitignore lib/.gitignore log/.gitignore tmp/.gitignore vendor/.gitignore


3. Create a new .gitignore file in the root directory [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=32&subd=mexpolk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s how to add a recently created Ruby on Rails project to git:</p>
<p>1. Create your new project:</p>
<div class="CodeRay">
<div class="code">
<pre>$ rails -d mysql project_name</pre>
</div>
</div>
<p>2. Create some .gitignore empty files so you save the entire structure of your project (git doesn&#8217;t include empty folders):</p>
<div class="CodeRay">
<div class="code">
<pre>$ touch db/.gitignore lib/.gitignore log/.gitignore tmp/.gitignore vendor/.gitignore</pre>
</div>
</div>
<p>3. Create a new .gitignore file in the root directory of your project with the following content:</p>
<div class="CodeRay">
<div class="code">
<pre>log/**/*
tmp/**/*
db/schema.rb</pre>
</div>
</div>
<p><strong>Note:</strong> <em>If you are using sqlite add db/*.sqlite3 to .gitignore so you do not have the database into the repository (you can db:migrate it whenever you need it). Thanks for your reply <a href="http://ropiku.wordpress.com/">Piku</a>.</em></p>
<p>4. Initialize local repository:</p>
<div class="CodeRay">
<div class="code">
<pre>$ git init</pre>
</div>
</div>
<p>5. Add the project files and make que initial import:</p>
<div class="CodeRay">
<div class="code">
<pre>$ git add .
$ git commit -a -m &quot;* Initial import&quot;</pre>
</div>
</div>
<p>6. Finally if you have a gitosis server you can add it with the following commands:</p>
<div class="CodeRay">
<div class="code">
<pre>$ git remote add origin git@YOUR_SERVER_NAME:project_name.git
$ git push origin master</pre>
</div>
</div>
<p>That&#8217;s it, your project sources are now managed by git.</p>
<p>Happy hacking!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mexpolk.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mexpolk.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mexpolk.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mexpolk.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mexpolk.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mexpolk.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mexpolk.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mexpolk.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mexpolk.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mexpolk.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mexpolk.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mexpolk.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mexpolk.wordpress.com&blog=2781879&post=32&subd=mexpolk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mexpolk.wordpress.com/2008/06/10/adding_a_ruby_on_rails_project_to_git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4859e9f7b0c9d1ef22ec2d69bf3f4b13?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">mexpolk</media:title>
		</media:content>
	</item>
	</channel>
</rss>