<?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>Alastair&#039;s Axioms &#187; Ruby on Rails</title>
	<atom:link href="http://blog.alastairdawson.com/category/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.alastairdawson.com</link>
	<description>Let us toast your non-idiocy</description>
	<lastBuildDate>Wed, 11 Aug 2010 18:09:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Paperclip for easy Rails file uploads</title>
		<link>http://blog.alastairdawson.com/2008/11/25/paperclip-for-easy-rails-file-uploads/</link>
		<comments>http://blog.alastairdawson.com/2008/11/25/paperclip-for-easy-rails-file-uploads/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 07:17:13 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/11/25/paperclip-for-easy-rails-file-uploads/</guid>
		<description><![CDATA[It&#8217;s my first post in months*, so it must be worth it right?
Rails Inside has the details on Paperclip as an alternative file upload/association plugin, I&#8217;ve tried them all and paperclip covers all your file upload bases.
*I&#8217;ve been busy with Fatherhood 101 and my new job as a Flex Dev at Captial Group (the largest [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s my first post in months*, so it must be worth it right?</p>
<p><a href="http://www.railsinside.com/plugins/149-paperclip-file-attachment-image-upload-plugin-for-rails.html">Rails Inside has the details on Paperclip</a> as an alternative file upload/association plugin, I&#8217;ve tried them all and paperclip covers all your file upload bases.</p>
<p>*I&#8217;ve been busy with Fatherhood 101 and my new job as a Flex Dev at <a href="http://www.capgroup.com/">Captial Group</a> (the largest company you&#8217;ve never heard of).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/11/25/paperclip-for-easy-rails-file-uploads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Display Rails associations in a Flex DataGridColumn</title>
		<link>http://blog.alastairdawson.com/2008/06/29/display-rails-associations-in-a-flex-datagridcolumn/</link>
		<comments>http://blog.alastairdawson.com/2008/06/29/display-rails-associations-in-a-flex-datagridcolumn/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 18:17:54 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/06/29/display-rails-associations-in-a-flex-datagridcolumn/</guid>
		<description><![CDATA[Frameworks like Ruby on Rails and CakePHP make it easy to set up model associations with belongs_to, has_many, and the ever popular has_and_belongs_to_many. However, getting those associations to show up in a Flex DataGridColumn&#8217;s dataField isn&#8217;t immediately obvious, you&#8217;d assume you could just do parent.child or child.parent but that just gives a blank column. After [...]]]></description>
			<content:encoded><![CDATA[<p>Frameworks like Ruby on Rails and CakePHP make it easy to set up model associations with belongs_to, has_many, and the ever popular has_and_belongs_to_many. However, getting those associations to show up in a Flex DataGridColumn&#8217;s dataField isn&#8217;t immediately obvious, you&#8217;d assume you could just do parent.child or child.parent but that just gives a blank column. After some digging I found the answer is to use a labelFunction.</p>
<p>In the example below there are two models in Rails, &#8216;Group&#8217; and &#8216;Category&#8217;, Group has_many Categories and Category belongs_to Group. Here&#8217;s the Flex code for the Categories DataGrid, groupName is the labelFunction that spits out a Category&#8217;s Group name (equivalent to @category.group.name in ruby):</p>
<pre class="textmate-source"><span class="text text_xml text_xml_mxml"><span class="meta meta_tag meta_tag_preprocessor meta_tag_preprocessor_xml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml">&lt;?</span><span class="entity entity_name entity_name_tag entity_name_tag_xml">xml</span><span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_xml"> version</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml">&quot;</span>1.0<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml">&quot;</span></span><span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_xml"> encoding</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml">&quot;</span>utf-8<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml">&quot;</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml">?&gt;</span></span>
<span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">VBox</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_namespace entity_other_attribute-name_namespace_xml entity_other_attribute-name_namespace_xml_mxml">xmlns</span>:<span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">mx</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>http://www.adobe.com/2006/mxml<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">width</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>100%<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">height</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>100%<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>

    <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">Script</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
        <span class="string string_unquoted string_unquoted_cdata string_unquoted_cdata_xml string_unquoted_cdata_xml_mxml punctuation string_unquoted_cdata_xml_mxml punctuation_definition string_unquoted_cdata_xml_mxml punctuation_definition_string string_unquoted_cdata_xml_mxml punctuation_definition_string_begin string_unquoted_cdata_xml_mxml punctuation_definition_string_begin_xml string_unquoted_cdata_xml_mxml punctuation_definition_string_begin_xml_mxml">&lt;![CDATA[</span><span class="source source_actionscript source_actionscript_3 source_actionscript_3_embedded source_actionscript_3_embedded_mxml">
            <span class="storage storage_type storage_type_import storage_type_import_actionscript storage_type_import_actionscript_3">import <span class="support support_class support_class_actionscript support_class_actionscript_3">mx.controls.dataGridClasses.DataGridColumn</span>;</span>

            <span class="storage storage_type storage_type_modifier storage_type_modifier_actionscript storage_type_modifier_actionscript_3">private <span class="storage storage_type storage_type_actionscript storage_type_actionscript_3">function</span> <span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_actionscript entity_name_type_class_actionscript_3">groupName</span></span>( <span class="support support_function support_function_properties support_function_properties_actionscript support_function_properties_actionscript_3">item</span><span class="keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript keyword_operator_symbolic_actionscript_3">:</span><span class="support support_class support_class_actionscript support_class_actionscript_3">Object</span>, column<span class="keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript keyword_operator_symbolic_actionscript_3">:</span><span class="support support_class support_class_actionscript support_class_actionscript_3">DataGridColumn</span> )<span class="keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript keyword_operator_symbolic_actionscript_3">:</span><span class="support support_class support_class_actionscript support_class_actionscript_3">String</span>
            {
                <span class="keyword keyword_control keyword_control_end keyword_control_end_actionscript keyword_control_end_actionscript_3">return</span> <span class="support support_function support_function_properties support_function_properties_actionscript support_function_properties_actionscript_3">item</span><span class="keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript keyword_operator_symbolic_actionscript_3">.</span>group<span class="keyword keyword_operator keyword_operator_symbolic keyword_operator_symbolic_actionscript keyword_operator_symbolic_actionscript_3">.</span><span class="support support_function support_function_actionscript support_function_actionscript_3">name</span>;
            }

        </span><span class="string string_unquoted string_unquoted_cdata string_unquoted_cdata_xml string_unquoted_cdata_xml_mxml punctuation string_unquoted_cdata_xml_mxml punctuation_definition string_unquoted_cdata_xml_mxml punctuation_definition_string string_unquoted_cdata_xml_mxml punctuation_definition_string_end string_unquoted_cdata_xml_mxml punctuation_definition_string_end_xml string_unquoted_cdata_xml_mxml punctuation_definition_string_end_xml_mxml">]]&gt;</span>
    <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">Script</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>

    <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">DataGrid</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">id</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>dataGrid<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">width</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>100%<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">height</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>100%<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
        <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">columns</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
            <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">DataGridColumn</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">headerText</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>Name<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">dataField</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>name<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> /<span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
            <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">DataGridColumn</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">headerText</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>Group<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_localname entity_other_attribute-name_localname_xml entity_other_attribute-name_localname_xml_mxml">labelFunction</span>=<span class="string string_quoted string_quoted_double string_quoted_double_xml string_quoted_double_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_xml punctuation_definition_string_begin_xml_mxml">&quot;</span>groupName<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_xml punctuation_definition_string_end_xml_mxml">&quot;</span></span> /<span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
        <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">columns</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>
    <span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">DataGrid</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span>

<span class="meta meta_tag meta_tag_xml meta_tag_xml_mxml"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_namespace entity_name_tag_namespace_xml entity_name_tag_namespace_xml_mxml">mx</span><span class="punctuation punctuation_separator punctuation_separator_namespace punctuation_separator_namespace_xml punctuation_separator_namespace_xml_mxml">:</span><span class="entity entity_name entity_name_tag entity_name_tag_localname entity_name_tag_localname_xml entity_name_tag_localname_xml_mxml">VBox</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_xml punctuation_definition_tag_xml_mxml">&gt;</span></span></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/06/29/display-rails-associations-in-a-flex-datagridcolumn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting Links: YUIRails, Ebb faster than Mongrel and thin</title>
		<link>http://blog.alastairdawson.com/2008/03/05/interesting-links-yuirails-ebb-faster-than-mongrel-and-thin/</link>
		<comments>http://blog.alastairdawson.com/2008/03/05/interesting-links-yuirails-ebb-faster-than-mongrel-and-thin/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 15:23:42 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Merb]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/03/05/interesting-links-yuirails-ebb-faster-than-mongrel-and-thin/</guid>
		<description><![CDATA[The JavaScript library I use most after prototype is YUI so a big thanks to Chetan Patil for making it much easier to use in Rails.
Ruby Inside has a post on Ebb a small and fast web server for hosting Rails and Merb applications (and soon Django).
Ebb is a small, extremely high performance Web / [...]]]></description>
			<content:encoded><![CDATA[<p>The JavaScript library I use most after prototype is <a href="http://developer.yahoo.com/yui/">YUI</a> so a big thanks to <a href="http://justbarebones.blogspot.com/2008/01/announcing-yuirails.html">Chetan Patil</a> for making it much easier to use in Rails.</p>
<p>Ruby Inside <a href="http://www.rubyinside.com/ebb-web-framework-http-server-786.html">has a post</a> on <a href="http://ebb.rubyforge.org/">Ebb</a> a small and fast web server for hosting Rails and Merb applications (and soon Django).</p>
<blockquote><p>Ebb is a small, extremely high performance Web / HTTP server designed specifically for hosting applications built upon Web frameworks such as Rails and Merb (and, in future, apps on other non-Ruby frameworks.) The design is event based (similar to that used by Ruby daemons that use EventMachine) but Ebb itself is written in C and dispatches requests to Rack adapters. This is a real leapfrog over the popular Mongrel and Thin daemons which are primarily written in Ruby, and results in scary levels of performance.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/03/05/interesting-links-yuirails-ebb-faster-than-mongrel-and-thin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mosso offers &#8216;new&#8217; cloud hosting</title>
		<link>http://blog.alastairdawson.com/2008/02/19/mosso-offers-new-cloud-hosting/</link>
		<comments>http://blog.alastairdawson.com/2008/02/19/mosso-offers-new-cloud-hosting/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 17:01:32 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[Media Temple]]></category>
		<category><![CDATA[Mosso]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[SliceHost]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/02/19/mosso-offers-new-cloud-hosting/</guid>
		<description><![CDATA[I got all excited this morning reading TechCrunch with their post about Rackspace Offerering Cloud Computing with Mosso. Once I clicked through to investigate further it seems the &#8216;new&#8217; cloud hosting is just their old hosting plan with 30GB of storage slashed off (down to 50GB) so they can charge you 0.50/GB a month for [...]]]></description>
			<content:encoded><![CDATA[<p>I got all excited this morning reading TechCrunch with their post about <a href="http://www.techcrunch.com/2008/02/19/rackspace-offers-cloud-computing-with-mosso/">Rackspace Offerering Cloud Computing with Mosso</a>. Once I clicked through to investigate further it seems the &#8216;new&#8217; <a href="http://www.mosso.com/cloud.jsp">cloud hosting</a> is just their old hosting plan with 30GB of storage slashed off (down to 50GB) so they can charge you 0.50/GB a month for any overage.</p>
<p>It&#8217;s the deal of the century!? a bonus $15/month to get back to their old limit of 80GB. Still no shell access, and still $25-85/month per Rails site.</p>
<p>I had high hopes for Mosso and Rails but after trying them I felt I was being <a href="http://www.mosso.com/pricing.jsp">nickeled and dimed</a>, the lack of SSH didn&#8217;t bother me as they&#8217;re good about installing stuff for you, the kicker was $20/month if you wanted to add SSL. I also didn&#8217;t see marked speed improvements over shared (or grid) hosts like <a href="http://www.mediatemple.com">Media Temple</a> (who host this blog, but not on the grid on a VPS).</p>
<p>All my Rails sites continue to be hosted on <a href="http://www.slicehost.com">SliceHost</a>, actually my secret recipe is a combo of Media Temple for email, FTP, and static stuff then either DNS trickery or .htaccess rewrites to apps on SliceHost. The best of both worlds.</p>
<p>Anyway I call shenanigans on Mosso.</p>
<p><embed FlashVars='videoId=103481' src='http://southpark.comedycentral.com/sitewide/video_player/view/default/swf.jhtml' quality='high' bgcolor='#cccccc' width='332' height='316' name='comedy_central_player' align='middle' allowScriptAccess='always' allownetworking='external' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/02/19/mosso-offers-new-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Interesting Links: Rails and BlazeDS, Yahoo! map components for AS3</title>
		<link>http://blog.alastairdawson.com/2008/02/11/interesting-links-rails-and-blazeds-yahoo-map-components-for-as3/</link>
		<comments>http://blog.alastairdawson.com/2008/02/11/interesting-links-rails-and-blazeds-yahoo-map-components-for-as3/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 16:09:41 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flash Remoting]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/02/11/interesting-links-rails-and-blazeds-yahoo-map-components-for-as3/</guid>
		<description><![CDATA[Derek shows how to push AMF encoded messages from the server with Rails through BlazeDS.
Ted introduces the Yahoo! map components for AS3.
Combine the two and you could build a Flex/Rails app that tracks someone&#8217;s position in real time.
]]></description>
			<content:encoded><![CDATA[<p>Derek shows how to push AMF encoded messages from the server with <a href="http://flexonrails.net/?p=105">Rails through BlazeDS</a>.</p>
<p>Ted introduces the <a href="http://www.onflex.org/ted/2008/02/new-components-yahoo-maps-api-in-pure.php">Yahoo! map components for AS3</a>.</p>
<p>Combine the two and you could build a Flex/Rails app that tracks someone&#8217;s position in real time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/02/11/interesting-links-rails-and-blazeds-yahoo-map-components-for-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiteSpeed adds a Rails staging environment</title>
		<link>http://blog.alastairdawson.com/2008/02/04/litespeed-adds-a-rails-staging-environment/</link>
		<comments>http://blog.alastairdawson.com/2008/02/04/litespeed-adds-a-rails-staging-environment/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 07:54:15 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[LiteSpeed]]></category>
		<category><![CDATA[Mongrel]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/02/04/litespeed-adds-a-rails-staging-environment/</guid>
		<description><![CDATA[Via Dark as Light, the easy way to deploy Rails adds a staging environment.
Here are the LiteSpeed update instructions:
1. Click &#8216;update&#8217; in the LiteSpeed administration console
2. There is no step 2
3. see #2
Why more people don&#8217;t use LiteSpeed is beyond me. Hosting a Rails app takes only a couple more steps with no mongrel_clusters or [...]]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://www.darkaslight.com/blog/entry/29-New-Staging-Environment-in-LiteSpeed">Dark as Light</a>, the easy way to deploy Rails <a href="http://www.litespeedtech.com/latest/litespeed-web-server-3.3.4-released.html">adds a staging environment</a>.</p>
<p>Here are the LiteSpeed update instructions:</p>
<p>1. Click &#8216;update&#8217; in the LiteSpeed administration console<br />
2. There is no step 2<br />
3. see #2</p>
<p>Why more people don&#8217;t use LiteSpeed is beyond me. Hosting a Rails app takes <a href="http://www.usefuljaja.com/2007/5/litespeed-serve-a-ruby-on-rails-domain">only a couple more steps</a> with no mongrel_clusters or load balancing shenanigans.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/02/04/litespeed-adds-a-rails-staging-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex, Flash, and Ruby hourly billing rates</title>
		<link>http://blog.alastairdawson.com/2008/02/02/flex-flash-and-ruby-hourly-billing-rates/</link>
		<comments>http://blog.alastairdawson.com/2008/02/02/flex-flash-and-ruby-hourly-billing-rates/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 22:27:49 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Remoting]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/02/02/flex-flash-and-ruby-hourly-billing-rates/</guid>
		<description><![CDATA[HotGigs has a feature where they collect and aggregate the hourly bill rates of the consultants on their site. Here are the average hourly bill rates for Flex, Flash, and Ruby, surprisingly they have sub-categories for Flash all the way down to Flash Remoting but there&#8217;s just one category for Ruby with no Rails sub-category.
For [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hotgigs.com">HotGigs</a> has a feature where they collect and aggregate the hourly bill rates of the consultants on their site. Here are the average hourly bill rates for Flex, Flash, and Ruby, surprisingly they have sub-categories for Flash all the way down to Flash Remoting but there&#8217;s just one category for Ruby with no Rails sub-category.</p>
<p>For the Rails rate I&#8217;d guess that Rails is to Ruby as Flex is to ActionScript. I threw PHP in there as well to mix it up.</p>
<p><strong>ActionScript hourly bill rates</strong><br />
ActionScript bill rate (low):  $50.00<br />
ActionScript bill rate (high):  $75.00<br />
ActionScript pay rate (low):  $32.50<br />
ActionScript pay rate (high):  $48.75<br />
Average hourly bill rate: $62.50</p>
<p><strong>Adobe Flex hourly bill rates</strong><br />
Adobe Flex bill rate (low):  $75.00<br />
Adobe Flex bill rate (high):  $125.00<br />
Adobe Flex pay rate (low):  $48.75<br />
Adobe Flex pay rate (high):  $81.25<br />
Average hourly bill rate: $100.00</p>
<p><strong>Flash hourly bill rates</strong><br />
Flash bill rate (low):  $50.00<br />
Flash bill rate (high):  $75.00<br />
Flash pay rate (low):  $32.50<br />
Flash pay rate (high):  $48.75<br />
Average hourly bill rate: $62.50</p>
<p><strong>Flash Design</strong> (no full data but this was the average)<br />
Average hourly bill rate: $50</p>
<p><strong>Flash Remoting hourly bill rates</strong><br />
Flash Remoting bill rate (low):  $60.00<br />
Flash Remoting bill rate (high):  $80.00<br />
Flash Remoting pay rate (low):  $39.00<br />
Flash Remoting pay rate (high):  $52.00<br />
Average hourly bill rate: $70.00</p>
<p><strong>Ruby hourly bill rates</strong><br />
Ruby bill rate (low):  $75.00<br />
Ruby bill rate (high):  $95.00<br />
Ruby pay rate (low):  $48.75<br />
Ruby pay rate (high):  $61.75<br />
Average hourly bill rate: $85.00</p>
<p><strong>PHP hourly bill rates</strong><br />
PHP bill rate (low):  $70.00<br />
PHP bill rate (high):  $90.00<br />
PHP pay rate (low):  $45.50<br />
PHP pay rate (high):  $58.50<br />
Average hourly bill rate: $80.00</p>
<p>Flex had an <a href="http://seantheflashguy.com/blog/2007/11/30/adobe-flex-hourly-billing-rates-via-hotgigs/">average hourly bill rate of $70</a> a couple of months ago so it&#8217;s on the move (what recession?), if you&#8217;re an ActionScript Developer still doing Flash work get on the Flex train and raise those rates!</p>
<p>The rates seem about right to me (actually remoting seems low), what do you think?</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/pBhic4fzuYk&#038;rel=0&#038;color1=0xd6d6d6&#038;color2=0xf0f0f0&#038;border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pBhic4fzuYk&#038;rel=0&#038;color1=0xd6d6d6&#038;color2=0xf0f0f0&#038;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/02/02/flex-flash-and-ruby-hourly-billing-rates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Regular expressions make my head hurt</title>
		<link>http://blog.alastairdawson.com/2008/01/22/regular-expressions-make-my-head-hurt/</link>
		<comments>http://blog.alastairdawson.com/2008/01/22/regular-expressions-make-my-head-hurt/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 20:58:57 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[RegEx]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/01/22/regular-expressions-make-my-head-hurt/</guid>
		<description><![CDATA[A site to dull the pain Rubular. Via Ruby Inside.
]]></description>
			<content:encoded><![CDATA[<p>A site to dull the pain <a href="http://www.rubular.com/">Rubular</a>. Via <a href="http://www.rubyinside.com/interesting-ruby-tidbits-that-dont-need-separate-posts-14-699.html">Ruby Inside</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/01/22/regular-expressions-make-my-head-hurt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 2.0 and link_to_remote :with</title>
		<link>http://blog.alastairdawson.com/2008/01/18/rails-20-and-link_to_remote-with/</link>
		<comments>http://blog.alastairdawson.com/2008/01/18/rails-20-and-link_to_remote-with/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 18:22:18 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/01/18/rails-20-and-link_to_remote-with/</guid>
		<description><![CDATA[I&#8217;m moving an old app to Rails 2.0 and other than fixing some routes Ajax calls with link_to_remote and the :with parameter was the only thing that gave me some trouble. In the old version I was grabbing the current value of a drop down list with Prototype and passing it along using :with like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m moving an old app to Rails 2.0 and other than fixing some routes Ajax calls with link_to_remote and the :with parameter was the only thing that gave me some trouble. In the old version I was grabbing the current value of a drop down list with Prototype and passing it along using :with like this</p>
<pre class="textmate-source"><span class="text text_html text_html_ruby"><span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> link_to_remote image_tag<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">'</span>cms/add_16.gif<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">'</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>id</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>color_add<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>url</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">{</span><span class="meta meta_syntax meta_syntax_ruby meta_syntax_ruby_start-block"> </span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>controller</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>colors<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>action</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>new_ajax<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>id</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby">@</span>product</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>id <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">}</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>with</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>{ color_id: $F('color_id') }<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span>
<span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span></span></pre>
<p>But in Rails 2.0 the parameter wouldn&#8217;t go along for the ride, it seemed that the new authenticity_token that gets sent with Ajax calls was messing things up. Here&#8217;s the fix</p>
<pre class="textmate-source"><span class="text text_html text_html_ruby"><span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> link_to_remote image_tag<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">'</span>cms/add_16.gif<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">'</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>id</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>color_add<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>url</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">{</span><span class="meta meta_syntax meta_syntax_ruby meta_syntax_ruby_start-block"> </span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>controller</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>colors<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>action</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>new_ajax<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>id</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby">@</span>product</span><span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>id <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">}</span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span>
      <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>with</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_double string_quoted_double_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">"</span>'color_id='+$F('color_id')<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">"</span></span>
<span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span></span></pre>
<p>I freely admit JavaScript/Ajax is my weakest language so if I was doing it wrong the entire time let me know <img src='http://blog.alastairdawson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/01/18/rails-20-and-link_to_remote-with/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails: cleaner partials in forms</title>
		<link>http://blog.alastairdawson.com/2008/01/18/rails-cleaner-partials-in-forms/</link>
		<comments>http://blog.alastairdawson.com/2008/01/18/rails-cleaner-partials-in-forms/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 18:04:50 +0000</pubDate>
		<dc:creator>Alastair</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.vixiom.com/2008/01/18/rails-cleaner-partials-in-forms/</guid>
		<description><![CDATA[Damian pointed me to the patch ELC Technologies committed to Rails.
As he mentions previously you did something like
&#60;% form_for(@client) do &#124;f&#124; %&#62;
    &#60;%= render :partial =&#62; 'form', :locals =&#62; {:f =&#62; f} %&#62;
    &#60;%= submit_tag 'Create' %&#62;
&#60;% end %&#62;
but now you can just do&#8230;
&#60;% form_for(@client) do &#124;f&#124; %&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Damian <a href="http://elctech.com/2008/1/16/patching-rails-rendering-form-partials">pointed me to</a> the patch <a href="http://elctech.com/">ELC Technologies</a> committed to Rails.</p>
<p>As he mentions previously you did something like</p>
<pre class="textmate-source"><span class="text text_html text_html_ruby"><span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%</span> form_for<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby">@</span>client</span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span> <span class="keyword keyword_control keyword_control_start-block keyword_control_start-block_ruby">do </span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span><span class="variable variable_other variable_other_block variable_other_block_ruby">f</span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
    <span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> <span class="support support_function support_function_actionpack support_function_actionpack_rails">render</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>partial</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">'</span>form<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">'</span></span><span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby">,</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>locals</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">{</span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>f</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> f<span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">}</span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
    <span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> submit_tag <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">'</span>Create<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">'</span></span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
<span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%</span> <span class="keyword keyword_control keyword_control_ruby">end</span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span></span></pre>
<p>but now you can just do&#8230;</p>
<pre class="textmate-source"><span class="text text_html text_html_ruby"><span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%</span> form_for<span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">(</span><span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby">@</span>client</span><span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby">)</span> <span class="keyword keyword_control keyword_control_start-block keyword_control_start-block_ruby">do </span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span><span class="variable variable_other variable_other_block variable_other_block_ruby">f</span><span class="punctuation punctuation_separator punctuation_separator_variable punctuation_separator_variable_ruby">|</span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
    <span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> <span class="support support_function support_function_actionpack support_function_actionpack_rails">render</span> <span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>partial</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> f <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
    <span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%=</span> submit_tag <span class="string string_quoted string_quoted_single string_quoted_single_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby">'</span>Create<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby">'</span></span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span>
<span class="source source_ruby source_ruby_rails source_ruby_rails_embedded source_ruby_rails_embedded_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">&lt;%</span> <span class="keyword keyword_control keyword_control_ruby">end</span> <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby">%&gt;</span></span></span></pre>
<p>Cleaner and more intuitive, nice!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alastairdawson.com/2008/01/18/rails-cleaner-partials-in-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
