<?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/"
	>

<channel>
	<title>Blog &#124; The Working Group &#187; rails</title>
	<atom:link href="http://blog.twg.ca/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.twg.ca</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 18:32:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Meet the Panel of #nerdlearn 1.0:  THE FUTURE OF RAILS</title>
		<link>http://blog.twg.ca/2011/05/meet-the-panel-of-nerdlearn-the-future-of-rails/</link>
		<comments>http://blog.twg.ca/2011/05/meet-the-panel-of-nerdlearn-the-future-of-rails/#comments</comments>
		<pubDate>Wed, 11 May 2011 13:00:22 +0000</pubDate>
		<dc:creator>Andrés</dc:creator>
				<category><![CDATA[#nerdlearn]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[TWG News]]></category>
		<category><![CDATA[TWG Wine]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[geeks]]></category>
		<category><![CDATA[good people]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=1065</guid>
		<description><![CDATA[On May 19th TWG is hosting, &#8220;Good Developers Drinking Beer and Learning from Each Other&#8221; code named #nerdlearn. Much akin to our Good People Drinking Wine events, #nerdlearn is for local developers looking to connect with some of TO&#8217;s best senior developers in a panel/Q&#38;A format. This inaugural #nerdlearn will focus on THE FUTURE OF [...]<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2011/05/meet-the-panel-of-nerdlearn-the-future-of-rails/' addthis:title='Meet the Panel of #nerdlearn 1.0: &#60;br /&#62; THE FUTURE OF RAILS ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>On May 19th TWG is hosting, <em>&#8220;Good Developers Drinking Beer and Learning from Each Other&#8221;</em> code named <a title="#nerdlearn on twitter" href="http://twitter.com/#!/search/%23NerdLearn" target="_blank">#nerdlearn</a>. Much akin to our <em>Good People Drinking Wine</em> events, #nerdlearn is for local developers looking to connect with some of TO&#8217;s best senior developers in a panel/Q&amp;A format.</p>
<p>This inaugural #nerdlearn will focus on THE FUTURE OF RAILS (yes, in all caps), but going forward we&#8217;ll choose topics that influence the entire sphere of being an excellent developer.</p>
<p><strong>RSVP here: </strong><a title="#nerdlearn registration" href="http://guestli.st/55083" target="_blank"><strong>http://guestli.st/55083</strong></a></p>
<h3>MEET THE PANELISTS:</h3>
<p>Pete Forde, Unspace:</p>
<p><img class="alignleft size-full wp-image-1116" style="margin-right: 15px; float: left;" title="pete" src="http://blog.twg.ca/wp-content/uploads/2011/05/pete.png" alt="@peteforde" width="166" height="166" />In 2004 Pete founded <a title="Unspace" href="http://unspace.ca" target="_blank">Unspace Interactive</a>. Not long after, he transition from proprietary Microsoft development to becoming one of the first adopters of Ruby on Rails. He was the curator of the RubyFringe and FutureRuby conferences, and hosts the popular monthly “Rails Pub Nite” developer event — of which there has been over 50 to date.</p>
<p>An avid traveler and occasional touring rock drummer, Pete is passionate about music and film photography. He recently co-founded <a title="BuzzData.com" href="http://buzzdata.com/" target="_blank">BuzzData</a>, a data publishing and collaboration hub.</p>
<p>Pete also likes to explore places you&#8217;re not supposed to go:</p>
<div><a href="http://domainride.ca/">http://domainride.ca/</a></div>
<div><a href="http://domainride.ca/"></a><a href="http://www.infiltration.org/journal-shepdonmills.html">http://www.infiltration.org/journal-shepdonmills.html</a></div>
<div><a href="http://www.infiltration.org/journal-shepdonmills.html"></a><img class="size-full wp-image-1115 alignnone" title="p3" src="http://blog.twg.ca/wp-content/uploads/2011/05/p3.jpg" alt="Pete Forde" width="248" height="302" /></div>
<div>You can also find Pete at: <a title="Pete's Twitter Account" href="http://twitter.com/peteforde" target="_blank">twitter.com/peteforde</a> &amp; <a title="Pete's Github Account" href="https://github.com/peteforde" target="_blank">github.com/peteforde</a></div>
<p>&#8212;&#8211;</p>
<p>TWG&#8217;s own, Scott Tadman (<em>brought to you by the number 4)</em>:</p>
<p><img class="alignleft size-full wp-image-1100" style="margin-right: 15px; float: left;" src="http://blog.twg.ca/wp-content/uploads/2011/05/tadmanter.png" alt="@tadmanter" width="166" height="166" />Since 1990, before most of us had even heard of the web, Scott&#8217;s been a database manager, network engineer, system administrator, software developer, creative director, writer, and electrician. So you can bet he&#8217;s involved at every stage of the projects TWG produces.</p>
<p>Scott is TWG&#8217;s Senior Architect; co-founder of <a title="PostageApp - The easier way to send email from your web app" href="http://postageapp.com" target="_blank">PostageApp.com</a>; and 4-time Science Fair Winner when he was a kid (unfortunately no photo available).</p>
<p>He is also the #4 Answerer on <a title="Scott's Stack Overflow Profile" href="http://stackoverflow.com/users/87189/tadman" target="_blank">Stack Overflow</a> for ruby-on-rails so be sure to ask him lots of questions at #nerdlearn &#8211; <a title="Stack Overflow - Ruby on Rails" href="http://stackoverflow.com/tags/ruby-on-rails/topusers" target="_blank">http://stackoverflow.com/tags/ruby-on-rails/topusers</a></p>
<p><img class="size-full wp-image-1106 alignnone" title="4-alltime-stack-overflow" src="http://blog.twg.ca/wp-content/uploads/2011/05/4-alltime-stack-overflow.png" alt="#4 Answerer on Stack Overflow for ruby-on-rails" width="600" height="234" /></p>
<p>You can also find Scott at: <a title="Scott's Twitter Account" href="http://twitter.com/tadmanter" target="_blank">twitter.com/tadmanter</a> &amp; <a title="Scott's Github Account" href="https://github.com/tadman" target="_blank">github.com/tadman</a></p>
<p>&#8212;&#8211;</p>
<p>Kevin Faustino, Nulayer:</p>
<p><img class="alignleft size-full wp-image-1075" style="margin-right: 15px; float: left;" title="kfaustino" src="http://blog.twg.ca/wp-content/uploads/2011/05/kfaustino.png" alt="@kfaustino" width="125" height="125" />Kevin is a passionate programmer and craftsmanship advocate who works at <a title="nulayer.com" href="http://nulayer.com" target="_blank">Nulayer</a> as a Senior Software Developer. He has been professionally developing for 6 years, with the last 3 years focused on Ruby and Ruby on Rails.</p>
<p>When not working, he is organizing the <a title="@torontorb" href="http://www.meetup.com/torontoruby/" target="_blank">Toronto Ruby Brigade</a> and blogging at <a title="Kevin's blog" href="http://adventuresincoding.com/" target="_blank">adventuresincoding.com</a>.</p>
<p>You can also find Kevin at: <a title="Kevin's twitter account" href="http://twitter.com/kfaustino">twitter.com/kfaustino</a> &amp; <a title="Kevin's github account" href="https://github.com/kfaustino" target="_blank">github.com/kfaustino</a></p>
<p>We also suspect that Kevin likes <a title="YouTube summary of LOST in 3mins" href="http://youtu.be/-HWECQa23Cs" target="_blank">Lost</a>:<a href="http://blog.twg.ca/wp-content/uploads/2011/05/kfaustino_LOST-e1304710124151.png"><img class="alignnone size-full wp-image-1066" title="kfaustino_LOST" src="http://blog.twg.ca/wp-content/uploads/2011/05/kfaustino_LOST-e1304710124151.png" alt="LOST DVD Set" width="550" height="600" /></a></p>
<p><strong>Meet Kevin, Scott and Pete on May 19th, 6:30pm at TWG HQ: </strong><strong><a title="#nerdlearn registration" href="http://guestli.st/55083" target="_blank">http://guestli.st/55083</a></strong></p>
<h3>Other upcoming Dev events you might be interested in:</h3>
<p>May 20th: <strong>Ruby Job Fair</strong> at Unspace, featuring Rubyists, Employers, and Spiked Tea &#8211; <a title="Ruby Job Fair" href="http://rubyjobfair.ca/" target="_blank">http://rubyjobfair.ca</a></p>
<p>June 2nd: <strong>Technologic</strong> at UnSpace, featuring Giles Bowkett &#8211; <a title="Technologic" href="http://technologicto.com/" target="_blank">http://technologicto.com</a></p>
<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2011/05/meet-the-panel-of-nerdlearn-the-future-of-rails/' addthis:title='Meet the Panel of #nerdlearn 1.0: &lt;br /&gt; THE FUTURE OF RAILS ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2011/05/meet-the-panel-of-nerdlearn-the-future-of-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Seeking talented web developer who can score over 14 points.</title>
		<link>http://blog.twg.ca/2011/03/seeking-talented-web-developer-who-can-bench-over-14-points/</link>
		<comments>http://blog.twg.ca/2011/03/seeking-talented-web-developer-who-can-bench-over-14-points/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 20:16:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[About TWG Series]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=986</guid>
		<description><![CDATA[TWG is a web development shop for designers, coders, thinkers and friends. Each day we pour all of our creative energy into what we love, and that makes getting out of bed in the morning the easiest decision to make all day. For some, working at TWG will be a career, for others, it will [...]<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2011/03/seeking-talented-web-developer-who-can-bench-over-14-points/' addthis:title='Seeking talented web developer who can score over 14 points. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.twg.ca/wp-content/uploads/2011/03/tumblr_lhjka4PVhf1qarolto1_500.jpg" alt="" title="tumblr_lhjka4PVhf1qarolto1_500" width="500" height="524" class="alignnone size-full wp-image-1011" /></p>
<p>TWG is a web development shop for designers, coders, thinkers and friends. Each day we pour all of our creative energy into what we love, and that makes getting out of bed in the morning the easiest decision to make all day.</p>
<p>For some, working at TWG will be a career, for others, <a href="http://blog.twg.ca/2010/10/twg-graduating-class/" target="_blank">it will be a stepping stone</a> on the way to other even greater things. And we&#8217;re fine with that, because we know that everyone&#8217;s path is a little bit different. In fact TWG&#8217;s <a href="http://blog.twg.ca/2011/02/the-big-goal-tedxtoronto-at-twg/" target="_blank">Big Hairy Audacious Goal</a> is to become the best web application shop in the world to Learn, Work and Innovate. If you&#8217;re still intrigued, please read on..</p>
<p>In the winter, we take a week off and head <a href="http://blog.twg.ca/2011/02/the-comfortable-mexican-sofa-vitamin-d-infused/" target="_blank">somewhere sunny</a> to regroup, re-energize and dream up the next big idea we want to tackle.<br />
<img src="http://blog.twg.ca/wp-content/uploads/2011/03/2344544698_23b8081fb2.jpg" alt="" title="" width="500" height="375" class="alignnone size-full wp-image-1002" /></p>
<p>In the summer, we take a week to head somewhere north with a nice lake, to sit around campfires, play music, and assess our progress and plan for the months ahead.</p>
<p><img src="http://blog.twg.ca/wp-content/uploads/2011/03/NERDS.png" alt="" width="400" height="273" /></p>
<p>And in between, we do all sorts of good stuff in our studio, building web and mobile apps for our clients, as well as <a href="http://postageapp.com" title="PostageApp.com">designing</a> and <a href="https://github.com/twg/comfortable-mexican-sofa" title="Comfortable-Mexican-Sofa, Rails3 MicroCMS">developing</a> our own products to bring online. We&#8217;re primarily a Ruby on Rails shop that has recently  started to work with html5, iOS and other mobile technologies. If you&#8217;re a talented web developer, and think you have plenty to learn and plenty to share, please read on..</p>
<p><strong><em>So what do you bench?<br />
</em></strong></p>
<p><strong>There are some things you should know something about. For each line that you satisfy, count 2 points:</strong></p>
<p>You have very good HTML and css skills<br />
You have a solid grasp of javascript, jQuery, ajax, json<br />
You have experience coding in Ruby on Rails,<br />
You know what OOP is and what to do with it<br />
You have written tests in either UnitTest, RSpec, or some other test driven framework<br />
You have experience using mySQL or PostgreSQL<br />
You use code versioning systems like git, svn, cvs<br />
You have worked in php, or asp,</p>
<p><strong>Context points. For each line that you satisfy, count 1 point:</strong><br />
You speak another language or have a *fünny* last name,<br />
You ride a bike a lot,<br />
You can play a musical instrument,<br />
You play a team sport,<br />
You paint, draw, sculpt, build,<br />
You have a blog,<br />
You use twitter regularly.<br />
You truly enjoy learning and teaching</p>
<p><strong>So what do you bench?<br />
</strong> If you score OVER 14, then send us your score breakdown and get in touch today!</p>
<p><strong>How To Get In Touch:<br />
</strong> To avoid people who don&#8217;t like to read or have fun, or robots that like to spam the world, we want you to email us at <strong>info@twg.ca</strong> and place the the immortal words of Lionel Ritchie in the subject line: <em>Hello, is it me you&#8217;re looking for?</em></p>
<p><iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/PDZcqBgCS74" frameborder="0" allowfullscreen></iframe></p>
<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2011/03/seeking-talented-web-developer-who-can-bench-over-14-points/' addthis:title='Seeking talented web developer who can score over 14 points. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2011/03/seeking-talented-web-developer-who-can-bench-over-14-points/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Active state for link_to == active_link_to. A solution for building navigation systems in Rails.</title>
		<link>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/</link>
		<comments>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 18:07:45 +0000</pubDate>
		<dc:creator>Oleg</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[active state]]></category>
		<category><![CDATA[active_link]]></category>
		<category><![CDATA[active_link_to]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=346</guid>
		<description><![CDATA[I have a question for you. How do you deal with the logic of setting links as active in your navs? Actually, I don&#8217;t want to know. It&#8217;s probably awful. I might have a pretty good solution for you. Let&#8217;s take a look at a very simple nav. These examples all use HAML: %ul &#160; [...]<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/' addthis:title='Active state for link_to == active_link_to. A solution for building navigation systems in Rails. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>I have a question for you. How do you deal with the logic of setting links as active in your navs?</p>
<p>Actually, I don&#8217;t want to know. It&#8217;s probably awful. I might have a pretty good solution for you. Let&#8217;s take a look at a very simple nav. These examples all use <a href="http://haml-lang.com/">HAML</a>:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Home'</span>, home_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>Right, that&#8217;s great. But how do I insert logic as to what link gets marked as active? To begin, let&#8217;s quickly install this random gem:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> active_link_to</div></div>
<p>And then change our nav a bit:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>And that&#8217;s pretty much it.</p>
<p>So, for example, if you navigate to /kittens/1-my-fluffy-kitten navigation link for &#8216;Kittens&#8217; will have &#8216;active&#8217; class attached to it. It&#8217;s almost like magic.</p>
<p>You probably noticed that &#8216;Home&#8217; is highlighted as well. It happened because whatever URL you are currently on is a child of the home_path. I guess we want to mark it as active only if we find ourselves on the home page and not anywhere else. We can fix this:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path, <span style="color:#ff3333; font-weight:bold;">:active</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:<span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:self_only</span><span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>Hey, wanna render a sub nav when you find yourself browsing /puppies or any page under that URL? It&#8217;s just sooo easy:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path, <span style="color:#ff3333; font-weight:bold;">:active</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:<span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:self_only</span><span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li<br />
&nbsp; &nbsp; = active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">-</span> <span style="color:#9966CC; font-weight:bold;">if</span> is_active_link?<span style="color:#006600; font-weight:bold;">&#40;</span>puppies_path<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Big'</span>, big_puppies_path<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Small'</span>, small_puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>And that&#8217;s the skinny of what active_link_to is for.</p>
<p>For more documentation on more functionality checkout project on GitHub: <a href="http://github.com/theworkinggroup/active_link_to">http://github.com/theworkinggroup/active_link_to</a></p>
<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/' addthis:title='Active state for link_to == active_link_to. A solution for building navigation systems in Rails. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails mass mailing &#8211; it shouldn&#8217;t be this complicated</title>
		<link>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/</link>
		<comments>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:16:32 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[ar_mailer]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[posategapp]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.theworkinggroup.ca/?p=57</guid>
		<description><![CDATA[The requests we get from our clients for &#8220;social networking&#8221; type tools and features has grown exponentially over the past two years. To make a user experience relevant, easy, secure, means that an application will need to send email notifications to that user (to register, to tell them of friend&#8217;s messages, to send them newsletters [...]<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/' addthis:title='Rails mass mailing &#8211; it shouldn&#8217;t be this complicated ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>The requests we get from our clients for &#8220;<em>social networking</em>&#8221; type tools and features has grown exponentially over the past two years. To make a user experience relevant, easy, secure, means that an application will need to send email notifications to that user (to register, to tell them of friend&#8217;s messages, to send them newsletters or updates, to send tickets, calendar bookings .. the list goes on).<br />
<strong><br />
Why is this a problem?</strong> Because sending an email is not an instantaneous action. The more emails you try to send, the longer you may have to wait as the application sends them. Imagine an app that lets you invite 300 friends to an event. Multiply this with 300 people sending the same invite to their friends.</p>
<p>While Rails was kind enough to provide a simple way to send emails, it left out one important detail. <em>You can only send one at a time!</em></p>
<p>If you find yourself in the unfortunate position where you need to mass mail then you&#8217;re on your own. So what do you do? You Google around of course. Someone is bound to have figured this one out.</p>
<p><strong>It looks like there are 3 ways to solve this:</strong></p>
<p><strong>1. Use existing email marketing services</strong></p>
<p>You can go with this option. There are plenty out there: Mail Chimp, Constant Contact, Thin Data, Campaign Monitor, Campaigner and others. All you need to do is generate some kind of mailing list and import it into one of these systems and then keep it up to date. But that&#8217;s not always practical. Not if you want your users to be able to initiate the mass mailing by themselves.  Don&#8217;t get me wrong, these services are great at what they do, but what we really want to do is to send mass emails from our own app.</p>
<p><strong>2. Use existing code</strong></p>
<p>If you really want your Rails app to be able to send mass mails at a click of a button you can try using Eric Hodel&#8217;s ar_mailer which is on version 1.4.0 as of June 2009. This has the advantage of letting you use the email addresses that you already have on your system (no exporting and importing to a different system) but before you get to that you still have to integrate it with whatever version of Rails you happen to be using.  Assuming you get it working properly, now you have a brand new background process to take care of.</p>
<p>Ar_mailer is great but leaves you half way there.</p>
<p>* The queue is not smart enough to prioritize emails. If one user sends 5000 invitations and after that another user wants to recover his password, he&#8217;ll have to wait until all 5000 emails are sent before he gets his password back. The users receiving the invitation won&#8217;t notice if  it takes a bit longer to reach them, but the guy that is trying to recover his password will be upset if he doesn&#8217;t get it right away. This is obviously not good enough.<br />
* How do you monitor if an email has been sent or failed?<br />
* If you have an email template and your client wants to change it all the time, what do you do?</p>
<p><strong>3. Build it all from scratch</strong></p>
<p>Even if you decide to do it yourself from scratch you&#8217;ll still need a queue to store the emails that will be sent at some time in the near future by another process running in the background. From there on, it depends on what you really need. Be prepared to put aside some extra time because it ain&#8217;t simple.</p>
<p><strong>So what would be the perfect solution? </strong>Simply put: I don&#8217;t want to have to worry about it. I want to be able to say: &#8220;Here&#8217;s my email, here&#8217;s the list of people I want it sent to. Go and do it &#8230; please&#8221;.</p>
<p>Wouldn&#8217;t that be great? Sure it would! We&#8217;ve encountered this problem enough times to make us want to solve it for good.</p>
<p><strong>And so we&#8217;ve set out to build it and this is what we think a mass mailing solution:</strong></p>
<ol>
<li>I want to be able to use it independently of the language I&#8217;m coding in &#8211; it needs to have an API</li>
<li>I want to be able to use the same code I have right now (layouts, email templates, etc.) &#8211; it needs to integrate easily</li>
<li>I want to know if a specific email was sent, failed or if it hasn&#8217;t been sent yet and I want to know why &#8211; it needs reporting</li>
<li>If a client complains that the emails aren&#8217;t rendering correctly I want to be able to see what they are receiving &#8211; it needs to let me look at the emails sent</li>
<li>I want to be able to easily resend any email &#8211; it needs to let me act on it</li>
<li>I want to create and manage email templates so that my client can edit them without asking me every time and without forcing me to change the code and to deploy my app all over again &#8211; it needs an optional template management system.</li>
<li>I want the queue system to be smart enough to distinguish between a single email and a batch of 5000 emails and prioritize them accordingly &#8211; it needs a smart queue system.</li>
<li>And most importantly, how can all of this be done with minimal effort to set it up each time I create a new app. &#8211; it needs a plugin.</li>
</ol>
<p><strong>Postage App!</strong></p>
<p style="text-align: center;"><img class="size-full wp-image-204 aligncenter" title="Mass mailing app" src="http://theworkinggroup.ca/system/files/19/original/postageapp-mailing-diagram.jpg" alt="Mass mailing app" width="525" height="300" /></p>
<p>We are currently developing this system which will help us build better apps. We&#8217;re building it according to our needs and we think that these might also be the needs of other developers out there. <a href="http://postageapp.com/" target="_blank">Check it out and sign up</a> for an update on the developer free release!</p>
<p style="text-align: center;"><img src="file:///Users/jneto/Library/Caches/TemporaryItems/moz-screenshot.png" alt="" /></p>
<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/' addthis:title='Rails mass mailing &#8211; it shouldn&#8217;t be this complicated ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Livin&#8217; on the edge: Ruby, Rails, and Snow Leopard</title>
		<link>http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/</link>
		<comments>http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 18:38:35 +0000</pubDate>
		<dc:creator>Georges</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=102</guid>
		<description><![CDATA[Snow Leopard is out and I like having the latest and greatest, so I bought a new hard drive and clean installed Snow Leopard on it. This meant that I had the opportunity to reinstall my development environment with the benefit of a few years of experience and the advice of my fellow TWG&#8217;ers. Here&#8217;s [...]<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/' addthis:title='Livin&#8217; on the edge: Ruby, Rails, and Snow Leopard ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Snow Leopard is out and I like having the latest and greatest, so I bought a new hard drive and clean installed Snow Leopard on it. This meant that I had the opportunity to reinstall my development environment with the benefit of a few years of experience and the advice of my fellow TWG&#8217;ers.</p>
<p>Here&#8217;s how I got my newly installed Snow Leopard up to speed for Rails development.</p>
<p><img src="http://theworkinggroup.ca/system/files/16/original/snow-leopard-rails.jpg" alt="Ruby on Rails on Snow Leopard" width="500" height="230" /></p>
<h2>Ruby 1.9.1</h2>
<p>First, I got Ruby up to date. Snow Leopard  comes with Ruby 1.8.7 by default. There are many benefits to going with Ruby 1.9.1, so I went with that.</p>
<p>I wasn&#8217;t 100% ready to commit to Ruby 1.9.1, so I used <a title="rvm - ruby version manager" href="http://rvm.beginrescueend.com">rvm</a> to manage my Ruby interpreters. Many gems aren&#8217;t ready for 1.9 prime-time, so I wanted the ability to drop back to Ruby 1.8 if this blew up in my face. For an overview of what is working under Ruby 1.9, check out <a title="Is it Ruby 1.9?" href="http://www.isitruby19.com">isitruby19.com</a>.</p>
<p>I installed rvm with:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rvm<br />
rvm-install</div></div>
<p>Check out <a title="rvm - ruby version manager" href="http://rvm.beginrescueend.com">the rvm site</a> for more information. There&#8217;s some great documentation there.</p>
<p>Next, I ran</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rvm list</div></div>
<p>to see all my installed Ruby interpreters. When you do this, you&#8217;ll see that the only Ruby installed is the system Ruby 1.8.7.</p>
<p>I ran <code class="codecolorer bash default"><span class="bash">ruby <span style="color: #660033;">-v</span></span></code> to see which Ruby was being used by default. I saw that I was using Ruby 1.8.7:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ruby 1.8.7 <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2008</span>-08-<span style="color: #000000;">11</span> patchlevel <span style="color: #000000;">72</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>universal-darwin10.0<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p><code class="codecolorer bash default"><span class="bash">rvm</span></code> will happily install and activate any version of Ruby you want.<br />
I got it to install Ruby 1.9.1 with the following:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rvm use ruby <span style="color: #660033;">-v</span> 1.9.1</div></div>
<p>rvm will check to see if 1.9.1 is installed and, if it isn&#8217;t, it will download and install it for you. Once that is done, I ran <code class="codecolorer bash default"><span class="bash">rvm list</span></code> again and now saw Ruby 1.9.1 listed as well as Snow Leopard system Ruby.</p>
<p>After that was complete, I ran <code class="codecolorer bash default"><span class="bash">rvm 1.9.1</span></code>, and then <code class="codecolorer bash default"><span class="bash">ruby <span style="color: #660033;">-v</span></span></code> and saw that it worked:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ruby 1.9.1p243 <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2009</span>-07-<span style="color: #000000;">16</span> revision <span style="color: #000000;">24175</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>i386-darwin10.0.0<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>But, I wanted Ruby 1.9.1 to be the default on my system. I got rvm to set that default by executing:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rvm 1.9.1 <span style="color: #660033;">--default</span></div></div>
<p>Now, the system is set to use Ruby 1.9.1 by default.</p>
<p><em>Side note</em>: one of the neat features of rvm is that it can change your Ruby interpreter on-the-fly for you. This change isn&#8217;t permanent and only lasts for as long your Terminal session is open. For example, you can open one Terminal, execute &#8216;rvm system&#8217;, and have that Terminal use the Snow Leopard Ruby 1.8.7 while another one is running Ruby 1.9.1. This is <em>very</em> handy for compatibility testing.</p>
<h2>MySQL</h2>
<p>The next piece of the puzzle was MySQL. I have found that the best way to install packages like MySQL is via MacPorts.</p>
<p>If you haven&#8217;t done it yet, <a title="MacPorts" href="http://www.macports.org/install.php ">install MacPorts from here</a>. There&#8217;s a package for Snow Leopard, so be sure to select that one.</p>
<p>The MacPorts MySQL package is called <code class="codecolorer bash default"><span class="bash">mysql5-server-devel</span></code>, so I installed that:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> mysql5-server-devel</div></div>
<p>MacPorts will handle all the dependencies and then install MySQL. I followed all the post-install steps that the installer recommended &#8211; start-up items, etc. The MySQL it installed is 64-bit, as it should be.</p>
<p>I then had to connect Ruby with MySQL and I needed the gem for that. To properly install the gem, I had to specify the architecture and the location of the mysql_config5 utility. The arch setting ensured that I got a 64-bit gem to go along with my new 64-bit MySQL installation.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">ARCHFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64&quot;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql <span style="color: #660033;">--</span> <span style="color: #660033;">--with-mysql-config</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config5</div></div>
<h2>Ruby Gems</h2>
<p>I then ran <code class="codecolorer bash default"><span class="bash">gem list</span></code> to see what gems I had installed. If you do this, you&#8217;ll see what I saw: not much. This makes a lot of sense because gems are installed relative to the version of Ruby they were installed with. So, all the gems that Snow Leopard had installed for Ruby 1.8.7 are no longer around for use. It was at this point that I was happy I used <code class="codecolorer bash default"><span class="bash">rvm</span></code>. I dropped back to 1.8.7, got the list of installed gems and proceeded to re-install them under Ruby 1.9. But, <em>dear reader</em>, you don&#8217;t need to do this! Here&#8217;s how to get back to the default Snow Leopard gems under Ruby 1.9:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> actionmailer actionpack actionwebservice activerecord activeresource activesupport acts_as_ferret builder capistrano cgi_multipart_eof_fix chronic daemons dnssd fastthread gem_plugin haml highline hoe hpricot javan-whenever libxml-ruby mdalessio-dryopteris needle net-scp net-sftp net-ssh net-ssh-gateway nokogiri pauldix-feedzirra pauldix-sax-machine rack rails rake RedCloth ruby-openid ruby-yadis rubyforge rubygems-update rubynode rvm taf-curb</div></div>
<p>This&#8217;ll take a while. Go grab a coffee. Run around the block. Do something fun.</p>
<p>If any of these fail for you, check out <a title="Is it Ruby 1.9?" href="http://www.isitruby19.com">isitruby19.com</a> for tips on how to get it working.</p>
<h2>Passenger</h2>
<p>The next piece I needed was <a title="Passenger aka mod_rails" href="http://www.modrails.com">Passenger aka mod_rails</a>. I needed version 2.2.5 (newest as of writing) for this to all work together. I installed it with:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> passenger</div></div>
<p>This retrieved and compiled Passenger 2.2.5 for me. It might get a newer version for you. Once that completed, I ran:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> passenger-install-apache2-module</div></div>
<p>The Passenger module depends on your current Ruby version, so you have to re-compile Passenger if you change your Ruby version. It is important that the Passenger compilation properly links with the Ruby interpreter you want to use. In this case, that&#8217;s Ruby 1.9.1.</p>
<p>When you do this the Passenger installation, double-check the  paths that the Passenger compilation process outputs and ensure that it is properly finding the Ruby 1.9.1 installed in your .rvm directory. If you see paths that <em><strong>don&#8217;t</strong></em> go to .rvm in your home directory, then it is <em><strong>doing it wrong</strong></em>. If this happens, ensure that rvm is set to use 1.9.1 by default and try again.</p>
<p>Next, I edited my httpd.conf just as the Passenger installer recommended. I opened it up with <code class="codecolorer bash default"><span class="bash">open <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</span></code> and pasted in the Passenger lines.</p>
<p>The Passenger Preference Pane makes everything easier, so definitely wanted that.<br />
I got lucky and found that <a title="Passenger Preference Pane" href="http://www.fngtps.com/2009/09/new-os-more-pane-passenger-preference-pane-v1-3">it had <em>just been updated</em> to support Snow Leopard</a>, so make sure you get version 1.3 or greater.</p>
<h2>Taa daa!</h2>
<p>That&#8217;s it!<br />
Set up a Rails project in the Passenger Preference Pane and try it out! You should see your fully functional Rails app running.</p>
<div class="addthis_toolbox addthis_default_style addthis_" addthis:url='http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/' addthis:title='Livin&#8217; on the edge: Ruby, Rails, and Snow Leopard ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/09/livin-on-the-edge-ruby-rails-and-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

