<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.2" -->
<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/"
	>

<channel>
	<title>foobarblog 2.0</title>
	<link>http://blog.invalidobject.com</link>
	<description>Some words about software-development, music and more</description>
	<pubDate>Sun, 27 Jul 2008 12:33:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>
	<language>en</language>
			<item>
		<title>randy pausch died</title>
		<link>http://blog.invalidobject.com/2008/07/27/randy-pausch-died/</link>
		<comments>http://blog.invalidobject.com/2008/07/27/randy-pausch-died/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 12:02:08 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[private]]></category>
<category>presentation</category><category>speaking</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2008/07/27/randy-pausch-died/</guid>
		<description><![CDATA[  last year i wrote about the carnegie mellon professor randy pausch, who inspired millions of people with his &#8220;last lecture&#8221;. last friday at the age of 47 he died of complications from pancreatic cancer. once again i want to recommend his speech, as it is one of the best presentations i&#8217;ve ever seen.
also i [...] ]]></description>
			<content:encoded><![CDATA[<p> last year <a href="/2007/10/02/how-to-achieve-your-childhood-dreams/" class="liinternal">i wrote about the carnegie mellon professor randy pausch</a>, who inspired millions of people with his &#8220;last lecture&#8221;. last friday at the age of 47 <a href="http://www.cmu.edu/homepage/beyond/2008/summer/an-enduring-legacy.shtml" target="_blank" class="liexternal">he died</a> of complications from pancreatic cancer. once again i want to <a href="http://www.youtube.com/watch?v=ji5_MqicxSo" target="_blank" class="liexternal">recommend his speech</a>, as it is one of the best presentations i&#8217;ve ever seen.</p>
<p>also i want to recommend the website <a href="http://www.etc.cmu.edu/bvw/" target="_blank" class="liexternal">&#8220;building virtual worlds&#8221;</a> which hosts content of a class founded by randy pausch dealing with interactive worlds and virtual realities that are built by students. you can watch a video of one of the funniest worlds below.</p>
<p><object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/w_A8htd0fEg"><param name="movie" value="http://www.youtube.com/v/w_A8htd0fEg" /><param name="quality" value="high" />Medium: www.youtube.com</object>
<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2008/07/27/randy-pausch-died/feed/</wfw:commentRss>
		</item>
		<item>
		<title>webtv 2.0</title>
		<link>http://blog.invalidobject.com/2008/07/11/webtv-20/</link>
		<comments>http://blog.invalidobject.com/2008/07/11/webtv-20/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 17:39:02 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[private]]></category>
<category>web 2.0</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2008/07/11/webtv-20/</guid>
		<description><![CDATA[  have you ever wanted to watch tv online for free? now you get a chance at zattoo.com. i&#8217;m really impressed by the quality of this service, as it is all for free. you only have to download a small client to be able to watch the local channels you like (right now there are [...] ]]></description>
			<content:encoded><![CDATA[<p> have you ever wanted to watch tv online for free? now you get a chance at <a href="http://zattoo.com" target="_blank" class="liexternal">zattoo.com</a>. i&#8217;m really impressed by the quality of this service, as it is all for free. you only have to download a small client to be able to watch the local channels you like (right now there are 8 countries with 187 different channels supported). the software has also build in a nice program guide which displays the schedule of all channels in a clear way. so have a try&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2008/07/11/webtv-20/feed/</wfw:commentRss>
		</item>
		<item>
		<title>einführung in ruby on rails</title>
		<link>http://blog.invalidobject.com/2007/12/31/einfuhrung-in-ruby-on-rails/</link>
		<comments>http://blog.invalidobject.com/2007/12/31/einfuhrung-in-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 15:08:57 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[work]]></category>
<category>architecture</category><category>programming</category><category>rails</category><category>ruby</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/12/31/einfuhrung-in-ruby-on-rails/</guid>
		<description><![CDATA[  auch wenn es schon diverse howtos und einführungen im internet zu ruby on rails gibt, habe ich mich entschlossen, eine von mir kürzlich zu dem thema erstellte präsentation hier zu veröffentlichen. ich hoffe es erleichtert dem ein oder anderen den einstieg in rails&#8230;

 ]]></description>
			<content:encoded><![CDATA[<p> auch wenn es schon diverse howtos und einführungen im internet zu ruby on rails gibt, habe ich mich entschlossen, eine von mir kürzlich zu dem thema erstellte präsentation hier zu veröffentlichen. ich hoffe es erleichtert dem ein oder anderen den einstieg in rails&#8230;</p>
<p><object type="application/x-shockwave-flash" data="https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=215900&#038;doc=einfhrung-in-ruby-on-rails-1199112147773107-4" width="425" height="348"><param name="movie" value="https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=215900&#038;doc=einfhrung-in-ruby-on-rails-1199112147773107-4" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/12/31/einfuhrung-in-ruby-on-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>atreyu - cologne</title>
		<link>http://blog.invalidobject.com/2007/11/26/atreyu-cologne/</link>
		<comments>http://blog.invalidobject.com/2007/11/26/atreyu-cologne/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 21:35:01 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[music]]></category>
<category>cologne</category><category>concert</category><category>music</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/11/26/atreyu-cologne/</guid>
		<description><![CDATA[  yesterday i was at the atreyu concert in cologne. all in all it was a nice show, although the first supporting band &#8220;engel&#8221; had a poor start and killed their equipment right at the beginning, so that there was no bass for a few songs. the second band &#8220;still remains&#8221; did a better job [...] ]]></description>
			<content:encoded><![CDATA[<p> yesterday i was at the atreyu concert in cologne. all in all it was a nice show, although the first supporting band &#8220;<a href="http://www.myspace.com/engelmusic" target="_blank" class="liexternal">engel</a>&#8221; had a poor start and killed their equipment right at the beginning, so that there was no bass for a few songs. the second band &#8220;<a href="http://www.stillremains.com/" target="_blank" class="liexternal">still remains</a>&#8221; did a better job and managed to heat up the crowd quite well. afterwards <a href="http://www.atreyurock.com/" target="_blank" class="liexternal">atreyu</a> played a good mix of old and new songs. you can find one of them as a video below (i&#8217;m sorry for the miserable sound quality). or you can have a look at the <a href="/photos/concert-atreyu07/" class="liinternal">photo gallary</a>&#8230;</p>
<p><object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/8MvomH08CwY"><param name="movie" value="http://www.youtube.com/v/8MvomH08CwY" /><param name="quality" value="high" />Medium: www.youtube.com</object>
<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/11/26/atreyu-cologne/feed/</wfw:commentRss>
		</item>
		<item>
		<title>wax simulacra</title>
		<link>http://blog.invalidobject.com/2007/11/25/wax-simulacra/</link>
		<comments>http://blog.invalidobject.com/2007/11/25/wax-simulacra/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 16:57:10 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[music]]></category>
<category>music</category><category>songs</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/11/25/wax-simulacra/</guid>
		<description><![CDATA[  here is a little appetizer for the upcoming new mars volta album &#8220;the bedlam in goliath&#8221;. the video features the song wax simulacra&#8230;
Medium: www.youtube.com

 ]]></description>
			<content:encoded><![CDATA[<p> here is a little appetizer for the upcoming new mars volta album &#8220;the bedlam in goliath&#8221;. the video features the song wax simulacra&#8230;</p>
<p><object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/zDtb9cBG73k"><param name="movie" value="http://www.youtube.com/v/zDtb9cBG73k" /><param name="quality" value="high" />Medium: www.youtube.com</object>
<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/11/25/wax-simulacra/feed/</wfw:commentRss>
		</item>
		<item>
		<title>mars rocks again</title>
		<link>http://blog.invalidobject.com/2007/11/22/mars-rocks-again/</link>
		<comments>http://blog.invalidobject.com/2007/11/22/mars-rocks-again/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 19:44:40 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[music]]></category>
<category>concert</category><category>event</category><category>music</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/11/22/mars-rocks-again/</guid>
		<description><![CDATA[  the mars volta will embark on a european tour in the next few months. check out the schedule:
February 17th - Hamburg, Germany - Docks
On Sale Friday, November 23rd
Tickets available at www.eventim.de or www.kartenhaus.de
February 19th - Oslo, Norway - Sentrum
On sale Saturday November 24th
Tickets available at www.billettservice.no or by calling +47 815 33 133
February 20th [...] ]]></description>
			<content:encoded><![CDATA[<p> the mars volta will embark on a european tour in the next few months. check out the schedule:</p>
<p>February 17th - Hamburg, Germany - Docks<br />
On Sale Friday, November 23rd<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJVY/u_www.eventim.de" target="_new" title="This external link will open in a new window" class="liexternal">www.eventim.de</a> or <a href="http://click.myreg.net/r/n_439824181/t_eJVZ/u_www.kartenhaus.de" target="_new" title="This external link will open in a new window" class="liexternal">www.kartenhaus.de</a></p>
<p>February 19th - Oslo, Norway - Sentrum<br />
On sale Saturday November 24th<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJV0/u_www.billettservice.no" target="_new" title="This external link will open in a new window" class="liexternal">www.billettservice.no</a> or by calling +47 815 33 133</p>
<p>February 20th - Stockholm, Sweden -  Cirkus<br />
On sale Wednesday November 21st<br />
Tickets available at  <a href="http://click.myreg.net/r/n_439824181/t_eJV1/u_www.ticnet.se" target="_new" title="This external link will open in a new window" class="liexternal">www.ticnet.se</a> or by calling +46 8 660 1020</p>
<p>February 22nd - Copenhagen, Denmark -  Vega<br />
On sale NOW<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJV2/u_www.billetlugen.dk" target="_new" title="This external link will open in a new window" class="liexternal">www.billetlugen.dk</a></p>
<p>February 24th - Berlin, Germany - Huxleys<br />
On Sale Friday, November 23rd<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJV3/u_www.eventim.de" target="_new" title="This external link will open in a new window" class="liexternal">www.eventim.de</a> or <a href="http://click.myreg.net/r/n_439824181/t_eJV4/u_www.kartenhaus.de" target="_new" title="This external link will open in a new window" class="liexternal">www.kartenhaus.de</a></p>
<p>February 26th - Zurich, Switzerland - Volkshaus<br />
On Sale Friday, November 23rd<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJV5/u_www.ticketcorner.com" target="_new" title="This external link will open in a new window" class="liexternal">www.ticketcorner.com</a>  or <a href="http://click.myreg.net/r/n_439824181/t_eJV6/u_www.ticnet.se" target="_new" title="This external link will open in a new window" class="liexternal">www.starticket.ch</a></p>
<p>February 27th - Milan, Italy - Alcatraz<br />
On Sale Wednesday, November 21st<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJV7/u_www.ticketone.it" target="_new" title="This external link will open in a new window" class="liexternal">www.ticketone.it</a></p>
<p>February 29th - Madrid, Spain - La Riviera<br />
On Sale Friday, November 30th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJV8/u_www.iguapop.com" target="_new" title="This external link will open in a new window" class="liexternal">www.iguapop.com</a>, <a href="http://click.myreg.net/r/n_439824181/t_eJV9/u_www.servicaixa.com" target="_new" title="This external link will open in a new window" class="liexternal">www.servicaixa.com</a>, or by calling: 902.10.12.12</p>
<p>March 1st - Barcelona, Spain - Razzamatazz<br />
On Sale Friday, November 30th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJV+/u_www.iguapop.com" target="_new" title="This external link will open in a new window" class="liexternal">www.iguapop.com</a>, <a href="http://click.myreg.net/r/n_439824181/t_eJV./u_www.servicaixa.com" target="_new" title="This external link will open in a new window" class="liexternal">www.servicaixa.com</a>, or by calling: 902.10.12.12</p>
<p>March 3rd - Munich, Germany - Elser Halle<br />
On Sale Friday, November 23rd<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJWa/u_www.eventim.de" target="_new" title="This external link will open in a new window" class="liexternal">www.eventim.de</a> or <a href="http://click.myreg.net/r/n_439824181/t_eJWb/u_www.kartenhaus.de" target="_new" title="This external link will open in a new window" class="liexternal">www.kartenhaus.de</a></p>
<p>March 5th - Paris, France - Olympia<br />
On Sale Saturday, November 24th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWc/u_www.fnacspectacles.com" target="_new" title="This external link will open in a new window" class="liexternal">www.fnacspectacles.com</a> and <a href="http://click.myreg.net/r/n_439824181/t_eJWd/u_www.olympiahall.com" target="_new" title="This external link will open in a new window" class="liexternal">www.olympiahall.com</a></p>
<p>March 6th - Tilburg, Netherlands - 013 Music Hall<br />
On Sale Saturday, November 24th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWe/u_www.ticketservice.nl" target="_new" title="This external link will open in a new window" class="liexternal">www.ticketservice.nl</a></p>
<p>March 8th - Cologne, Germany - Live Music Hall<br />
On Sale Friday, November 23rd<br />
Tickets available at <a href="http://click.myreg.net/r/n_439824181/t_eJWf/u_www.eventim.de" target="_new" title="This external link will open in a new window" class="liexternal">www.eventim.de</a> or <a href="http://click.myreg.net/r/n_439824181/t_eJWg/u_www.kartenhaus.de" target="_new" title="This external link will open in a new window" class="liexternal">www.kartenhaus.de</a></p>
<p>March 9th - Brussels, Belgium - Ancienne Belgique<br />
On Sale Wednesday, November 21st<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWh/u_www.abconcerts.be" target="_new" title="This external link will open in a new window" class="liexternal">www.abconcerts.be</a> or by calling +32 2 548 24 24</p>
<p>March 11th - Glasgow, Scotland - Academy<br />
On Sale Monday, November 26th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWi/u_www.pclpresents.com" target="_new" title="This external link will open in a new window" class="liexternal">www.pclpresents.com</a> or by calling 08700 600 100</p>
<p>March 13th - Manchester, UK - Apollo<br />
On Sale Tuesday, November 27th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWj/u_www.gigsandtours.com" target="_new" title="This external link will open in a new window" class="liexternal">www.gigsandtours.com</a></p>
<p>March 14th - London, UK - Brixton Academy<br />
On Sale Tuesday, November 27th<br />
Tickets available at: <a href="http://click.myreg.net/r/n_439824181/t_eJWk/u_www.gigsandtours.com" target="_new" title="This external link will open in a new window" class="liexternal">www.gigsandtours.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/11/22/mars-rocks-again/feed/</wfw:commentRss>
		</item>
		<item>
		<title>surveys about agility and success</title>
		<link>http://blog.invalidobject.com/2007/11/20/surveys-about-agility-and-success/</link>
		<comments>http://blog.invalidobject.com/2007/11/20/surveys-about-agility-and-success/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 20:58:37 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[work]]></category>
<category>agile</category><category>projectmanagement</category><category>software</category><category>software-development</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/11/20/surveys-about-agility-and-success/</guid>
		<description><![CDATA[  at this years w-jax conference i attended a keynote by scott ambler, who&#8217;s one of the guys pushing the agile movement for several years now. in his talk he presented results of surveys about adoption rates of agile techniques and success rates of agile it-projects. there are some interesting numbers in it, despite the [...] ]]></description>
			<content:encoded><![CDATA[<p> at this years <a href="http://jax.de/" target="_blank" class="liexternal">w-jax</a> conference i attended a <a href="http://entwickler.com/konferenzen/planer/show_details.php?konferenzid=53&amp;sessionid=6427" target="_blank" class="liexternal">keynote</a> by scott ambler, who&#8217;s one of the guys pushing the agile movement for several years now. in his talk he presented results of surveys about <a href="http://www.ambysoft.com/surveys/success2007.html" class="liexternal">adoption rates of agile techniques</a> and <a href="http://www.ambysoft.com/surveys/success2007.html" target="_blank" class="liexternal">success rates of agile it-projects</a>. there are some interesting numbers in it, despite the fact that they are mostly covering the situation in the states. it would be even more interesting to collect data for these topics in europe, too, and draw some comparisons. for me the most important findings are:</p>
<ul>
<li>69% of organisations have adopted agile techniques so far</li>
<li>the most effective agile practices are &#8220;iterative development&#8221; and &#8220;regular delivery of working software&#8221;</li>
<li>one-third of projects are done with two week iterations</li>
<li>44% of organisations had a success rate of 90% or above for agile projects</li>
<li>project success rate for agile projects is 10% higher than for &#8220;traditional&#8221; projects</li>
<li>only 42% of offshoring projects are successful, but they are considerably more succesful in asia than in the rest of the world</li>
<li>the number of successful projects is dropping significantly for teams larger than 10 members</li>
<li>80% of it-managers and 70% of project managers put the needs of their staff over beeing on time and on budget</li>
<li>70-80% of it-personnel see a healthy workplace beeing more important than beeing on time and on budget, but only 53% of business stakeholders share this opinion <img src='http://blog.invalidobject.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/11/20/surveys-about-agility-and-success/feed/</wfw:commentRss>
		</item>
		<item>
		<title>how to achieve your childhood dreams</title>
		<link>http://blog.invalidobject.com/2007/10/02/how-to-achieve-your-childhood-dreams/</link>
		<comments>http://blog.invalidobject.com/2007/10/02/how-to-achieve-your-childhood-dreams/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 18:29:30 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[private]]></category>
<category>presentation</category><category>speaking</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/10/02/how-to-achieve-your-childhood-dreams/</guid>
		<description><![CDATA[  watch randy pausch, a 47 year old computer science professor of the carnegie-mellon university performing a stirring lecture about reflections on his life and the lessons he learned. you should know that randy is diagnosed pancreatic cancer and only has a few more months to live.
if googlevideo doesn&#8217;t work, try here for a windows [...] ]]></description>
			<content:encoded><![CDATA[<p> watch randy pausch, a 47 year old computer science professor of the carnegie-mellon university performing a stirring lecture about reflections on his life and the lessons he learned. you should know that randy is diagnosed pancreatic cancer and only has a few more months to live.</p>
<p>if googlevideo doesn&#8217;t work, try <a href="http://cmu.edu/uls/journeys/" target="_blank" class="liexternal">here</a> for a windows media player link.</p>
<p><object type="application/x-shockwave-flash" width="400" height="326" data="http://video.google.com/googleplayer.swf?docId=362421849901825950"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=362421849901825950" /><param name="quality" value="high" />Medium: video.google.com</object>
<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/10/02/how-to-achieve-your-childhood-dreams/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;give michael the ball and get out of the way&#8221;</title>
		<link>http://blog.invalidobject.com/2007/09/21/give-michael-the-ball-and-get-out-of-the-way/</link>
		<comments>http://blog.invalidobject.com/2007/09/21/give-michael-the-ball-and-get-out-of-the-way/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 19:24:50 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[private]]></category>
<category>basketball</category><category>sports</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/09/21/give-michael-the-ball-and-get-out-of-the-way/</guid>
		<description><![CDATA[  Medium: www.youtube.com

some nice slowmo moves of his airness&#8230;
 ]]></description>
			<content:encoded><![CDATA[<p> <object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/_i_8Nvr5eGg"><param name="movie" value="http://www.youtube.com/v/_i_8Nvr5eGg" /><param name="quality" value="high" />Medium: www.youtube.com</object>
<br /></p>
<p>some nice slowmo moves of his airness&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/09/21/give-michael-the-ball-and-get-out-of-the-way/feed/</wfw:commentRss>
		</item>
		<item>
		<title>rails error wrapping for select input fields of referenced models</title>
		<link>http://blog.invalidobject.com/2007/09/16/rails-error-wrapping-for-select-input-fields-of-referenced-models/</link>
		<comments>http://blog.invalidobject.com/2007/09/16/rails-error-wrapping-for-select-input-fields-of-referenced-models/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 12:23:52 +0000</pubDate>
		<dc:creator>foo.bar</dc:creator>
		
		<category><![CDATA[work]]></category>
<category>rails</category><category>ruby</category><category>testing</category>
		<guid isPermaLink="false">http://blog.invalidobject.com/2007/09/16/rails-error-wrapping-for-select-input-fields-of-referenced-models/</guid>
		<description><![CDATA[  during my rails development i recently came across the problem mentioned here. this is my concrete scenario&#8230;
first of all there are two model elements referenced by belongs_to resp. has_many:
class WorkingTime &#60; ActiveRecord::Base

  belongs_to  :project

  validates_presence_of :project, :message =&#62; 'Please select a project!'
  validates_associated :project
  validates_presence_of :hours_worked

end

class Project &#60; ActiveRecord::Base
 [...] ]]></description>
			<content:encoded><![CDATA[<p> during my rails development i recently came across the problem mentioned <a href="http://www.ruby-forum.com/topic/100053" class="liexternal">here</a>. this is my concrete scenario&#8230;<br />
first of all there are two model elements referenced by <code>belongs_to</code> resp. <code>has_many</code>:</p>
<pre><code class="ruby">class WorkingTime &lt; ActiveRecord::Base

  belongs_to  :project

  validates_presence_of :project, :message =&gt; 'Please select a project!'
  validates_associated :project
  validates_presence_of :hours_worked

end

class Project &lt; ActiveRecord::Base
  has_many :working_times
end
</code></pre>
<p>the input form to create an instance of this model looks something like this:</p>
<pre><code class="ruby">[...]
&lt;%= error_messages_for 'working_time' %&gt;

&lt;label for="project_of_working_time"&gt;Project&lt;/label&gt;
&lt;%= select :working_time, :project_id,
    Project.find(:all).collect {|p| [ p.name, p.id ] },
    { :include_blank =&gt; true }, :class =&gt; "working_time_select" %&gt;

&lt;label for="working_time_hours_and_minutes_worked"&gt;Hours Worked&lt;/label&gt;
&lt;%= text_field 'working_time', 'hours_worked', :size =&gt; 5  %&gt;

[...]
</code></pre>
<p>now if you try to save the form without selecting a project an appropriate error message is shown. this is not really remarkable. but the problem is that the select input field isn&#8217;t highlighted correctly like other input fields (i.e. the hours_worked if it is empty). i had a hard time to figure out the reason for this.</p>
<p>the error highlighting is based on the <code>errors</code> object that is passed to the view in case of validation errors. when the view is evaluated every input field looks in this object for an error associated to it by its name. if the method <code>errors.on(name of input field)</code> returns a value, a html-snipped is wrapped around the input field (btw, if you want to change the snipped, look <a href="http://wiki.rubyonrails.org/rails/pages/HowtoChangeValidationErrorDisplay" class="liexternal">here</a>). here is an example for the input textfield <code>hours_worked</code>:</p>
<pre><code class="ruby">&lt;div class="fieldWithErrors"&gt;
&lt;input id="workind_time_hours_worked"
     name="working_time[hours_worked]" size="5" type="text" value="" /&gt;
&lt;/div&gt;
</code></pre>
<p>the issue with the above mentioned <code>working_time</code> / <code>project</code> relation is that the validation error is mapped to the field <code>project</code> and not to <code>project_id</code>, since this is what i described in the model <code>working_time</code>. because the view cannot get the link to the <code>project</code>-error, the field will not be highlighted. you can validate this with a unit-test:</p>
<pre><code class="ruby">require 'working_time'

class WorkingTimeTest &lt; Test::Unit::TestCase

  def test_create_without_project
    @working_time = WorkingTime.new
    @working_time.hours_worked = 3
    result = @working_time.save
    assert !result
    errors = @working_time.errors
    assert_not_nil errors[:project]
    assert includes_match?(errors[:project], 'Please select a project!')
  end
end
</code></pre>
<p>the only solution is to change the validation in the <code>working_time</code> model from <code>project</code> to <code>project_id</code>. this is quite confusing because the <code>working_time</code> model actually doesn&#8217;t have a project_id field. what makes this even worse is that you also get validation errors if a <code>project</code> instance will be set in the <code>working_time</code> model. therefore the following test always fails:</p>
<pre><code class="ruby">require 'working_time'
require 'project'

class WorkingTimeTest &lt; Test::Unit::TestCase

  def test_create_with_project
    @working_time = WorkingTime.new
    @working_time.hours_worked = 3
    @working_time.project = Project.find(1)
    result = @working_time.save
    assert result
  end
end
</code></pre>
<p>i hope this issue will be fixed in a future version of rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.invalidobject.com/2007/09/16/rails-error-wrapping-for-select-input-fields-of-referenced-models/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
