<?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>if by whiskey &#187; rails</title>
	<atom:link href="http://ifbywhiskey.com/blog/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://ifbywhiskey.com/blog</link>
	<description>choose your poison</description>
	<lastBuildDate>Mon, 18 Jun 2007 18:32:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing the latest Aptana Rails plugin</title>
		<link>http://ifbywhiskey.com/blog/2007/06/16/aptana_rails_install/</link>
		<comments>http://ifbywhiskey.com/blog/2007/06/16/aptana_rails_install/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 12:39:03 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[ide]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://ifbywhiskey.com/blog/2007/06/16/aptana_rails_install/</guid>
		<description><![CDATA[It turns out I&#8217;m more of an eclipse novice than I thought!  Despite using Eclipse for Java development (since version 2!) and more recently for Rails work it&#8217;s taken me a while to figure out how to install the latest beta version of the Rails plugin for Aptana.  To summarise:

1. Download the current [...]]]></description>
			<content:encoded><![CDATA[<p>It turns out I&#8217;m more of an eclipse novice than I thought!  Despite using Eclipse for Java development (since version 2!) and more recently for Rails work it&#8217;s taken me a while to figure out how to install the latest <a href="http://www.aptana.com/blog/?p=144">beta</a> version of the Rails plugin for Aptana.  To summarise:</p>

<p>1. Download the current stable version of the <a href="http://aptana.com/download_all.php">Aptana <span class="caps">IDE</span></a><br />
2. Launch the Aptana <span class="caps">IDE </span>(and choose a workspace location)<br />
3. Install the Aptana RadRails plugin from the Aptana Start Page<br />
4. Restart Aptana<br />
5. Choose Window &#8230; Preferences, then Install/Update and enter the following policy url: http://update.aptana.com/update/rails/beta/3.2/policy.xml<br />
6. Click Ok, and restart Aptana<br />
7. Choose Help .. Software Updates &#8230; Find and Install then &#8220;Search for Updates of currently installed features&#8221;. If you expand the Rails plugin option you should see the following version listed: 0.8.0.200706111240 <br />
8. Install it.<br />
9. I&#8217;m sure you could skip installing two versions of the plugin if you really knew the score &#8230;<br />
 </p>]]></content:encoded>
			<wfw:commentRss>http://ifbywhiskey.com/blog/2007/06/16/aptana_rails_install/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Escaping the flash</title>
		<link>http://ifbywhiskey.com/blog/2007/05/20/escaping-the-flash/</link>
		<comments>http://ifbywhiskey.com/blog/2007/05/20/escaping-the-flash/#comments</comments>
		<pubDate>Sun, 20 May 2007 06:14:20 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://ifbywhiskey.com/blog/2007/05/20/escaping-the-flash/</guid>
		<description><![CDATA[At work we&#8217;re building an online community site with the aim of promoting sustainable lifestyles &#8211; quite similar to A year of living generously

The deadline is fast approaching, and Matthew and I have been coding hard to meet it.  Last week we were discussing what seemed to be a fairly generic problem &#8211; what&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>At work we&#8217;re building an online community site with the aim of promoting sustainable lifestyles &#8211; quite similar to <a href="http://generous.org.uk/">A year of living generously</a></p>

<p>The deadline is fast approaching, and Matthew and I have been coding hard to meet it.  Last week we were discussing what seemed to be a fairly generic problem &#8211; what&#8217;s the best way to <span class="caps">HTML </span>escape content you put in the flash?</p>

<p>We turned up this <a href="http://lists.rubyonrails.org/pipermail/rails/2006-January/011097.html">answer</a> via google, which suggests escaping it when you render it in your view, i.e. </p>



<pre>
<code class=&quot;ruby&quot;>&lt;%=h(flash[:notice])%&gt;</code>
</pre>



<p>All well and good, but sometimes you want a mixture of <span class="caps">HTML </span>and user generated content in the flash, e.g. </p>

<blockquote>
Sinbad has sent you a <a href="#">message</a><br />
</blockquote>


<p>So escaping the lot is not really an option.  </p>

<p>One solution is to use render_to_string with a partial as shown below:</p>

<h3>Controller</h3>



<pre>
<code class=&quot;ruby&quot;>def index
  if current_user.messages.any?
    flash[:notice] = render_to_string :partial =&gt; 'message', 
      :object =&gt; current_user.messages.first
  end
  # rest of action ...
end
</code></pre>



<h3>Partial</h3>



<pre><code class=&quot;ruby&quot;>&lt;%= h(message.sender) %&gt; has sent you a 
&lt;%= link_to &quot;message&quot;, :controller =&gt; 'messages', 
  :action =&gt; 'show', :id =&gt; message %&gt;
</pre>

<p></code></p>

<h3>Layout</h3>



<pre><code class=&quot;html&quot;>&lt;div class=&quot;notice&quot;&gt;
	&lt;%= flash[:notice] %&gt;
&lt;/div&gt;
</pre>

<p></code></p>

<p>I imagine :inline would also work, if a partial for a flash message seems like overkill.</p>]]></content:encoded>
			<wfw:commentRss>http://ifbywhiskey.com/blog/2007/05/20/escaping-the-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails &#8211; do you want fries with that?</title>
		<link>http://ifbywhiskey.com/blog/2007/04/20/acts_as_french_fries/</link>
		<comments>http://ifbywhiskey.com/blog/2007/04/20/acts_as_french_fries/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 11:58:33 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[whinge]]></category>

		<guid isPermaLink="false">http://ifbywhiskey.com/?p=3</guid>
		<description><![CDATA[I gave an effusive talk on Rails at work after completing my first project.  Coming from a Java background, I was impressed that it was easy to pick up, get started and get things done with  less faff than J2EE.  Convention was the new king, and I his happy servant.

Buoyed by my [...]]]></description>
			<content:encoded><![CDATA[<p>I gave an effusive talk on Rails at work after completing my first project.  Coming from a Java background, I was impressed that it was easy to pick up, get started and get things done with  less faff than <span class="caps">J2EE. </span> Convention was the new king, and I his happy servant.</p>

<p>Buoyed by my new found productivity, released from my shackles of indecision (which <span class="caps">MVC </span>framework?  What about transactions? How will this work in a cluster?)  I could just jump right it and get on with building the site.  Every line of code was going to the customer.  No need to worry about the tricky stuff, it&#8217;s a full stack framework and there&#8217;s a plugin for everything.</p>

<p>But what has working with Rails done for me, as a former Java developer?  Well the project timescales are generally tighter and the work productive yet stressful.  But these are subjective measures, what about the cold, hard cash?</p>


<table class="center" style="margin-left:auto;margin-right:auto" cellspacing="0"><tr style="color:#E2B454"><th>Technology</th><th>Salary</th><th align="right">Number of  jobs</th></tr><tr><td>Spring</td><td>&pound;51,567</td><td align="right">2944</td></tr><tr><td>Java</td><td>&pound;49,001</td><td align="right">34538</td></tr><tr><td>Hibernate</td><td>&pound;48,898</td><td align="right">3006</td></tr><tr><td>Struts</td><td>&pound;43,861</td><td align="right">2256</td></tr><tr><td>Spring <span class="caps">MVC</span></td><td>&pound;43,250</td><td align="right">40</td></tr><tr><td>Velocity</td><td>&pound;41,914</td><td align="right">99</td></tr><tr><td>.NET</td><td>&pound;40,507</td><td align="right">33598</td></tr><tr><td><span class="caps">ASP</span></td><td>&pound;34,587</td><td align="right">4217</td></tr><tr style="color:#924922"><th>Ruby on Rails</th><th>&pound;32,762</th><th align="right">146</th></tr><tr><td><span class="caps">PHP</span></td><td>&pound;32,436</td><td align="right">4328</td></tr><tr><td>Application development</td><td>&pound;42,560</td><td align="right">103178</td></tr></table>


<p class="center" style="text-align:center">Figures are 3 month averages, <a href="http://www.itjobswatch.co.uk/jobs/uk/ruby%20on%20rails.do">source</a></p>

<p>I&#8217;ve included a variety of technologies which fit within the web development domain because I&#8217;m conscious that there aren&#8217;t that many Rails jobs listed. The lower salary may just be a result of lower demand &#8211; I don&#8217;t have any numbers for the supply side of the equation. Currently Rails does seem to sit more towards the <span class="caps">PHP </span>rather <span class="caps">J2EE </span>end of the salary scale. </p>

<p class="center" style="text-align:center"><strong>Less filthy lucre == less snowflake moments</strong></p>

<p>At the moment, Rails is great if you are in the product development business and you want to get <i>Wet Dream 2.0</i> to market on a budget.  It&#8217;s great if you&#8217;re a small company aggressively bidding to win work at open tender.  It&#8217;s great if you are a lot smarter than me, on the lecture circuit with a cool blog and a bunch of plugins under your belt.</p>

<p>But if you are an average Joe Coder, choose wisely.  Perhaps ruminating over application architecture decisions and marshaling endless <span class="caps">XML </span>files was overpaid &#8211; or maybe &#8220;convention over configuration&#8221; makes web development easier, and cheaper.  Either way I&#8217;d better raise my game: If I&#8217;m going to install acts_as_french_fries I at least want to have written it.</p>]]></content:encoded>
			<wfw:commentRss>http://ifbywhiskey.com/blog/2007/04/20/acts_as_french_fries/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
