<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Holland On Rails Weblog Feed</title>
    <link>http://www.hollandonrails.nl</link>
    <description>Weblog over Ruby On Rails in den Nederlandsche taal</description>
    <item>
      <title>Ruby5</title>
      <description>&lt;p&gt;This week, when looking for an answer to one of my ruby issues, I stumbled across &lt;br /&gt;
an awesome website called &lt;a href=&quot;http://ruby5.envylabs.com/&quot;&gt;ruby5.envylabs.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Where you can listen to, and get updated on the latest ruby news in a couple of minutes.&lt;br /&gt;
You can subscribe to it via iTunes, and it also has an &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;-feed.&lt;/p&gt;
&lt;p&gt;Pretty easy to keep updated now, as you can just listen to it while doing your daily ruby business.&lt;/p&gt;
&lt;p&gt;Check it out!&lt;/p&gt;</description>
      <author>daniel.willemse@holder.nl (Daniel Willemse)</author>
      <category>hor</category>
      <pubDate>Thu, 29 Jul 2010 23:52:47 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/523-Ruby5</link>
      <guid>http://hollandonrails.nl/articles/523-Ruby5</guid>
    </item>
    <item>
      <title>Suppress Rails logging</title>
      <description>&lt;p&gt;When Rails applications get rather complex the amount of log statements can get rather big in development mode. It is not uncommon to get hundreds of lines of &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; log statements.&lt;/p&gt;
&lt;p&gt;This creates a problem when you try to insert your own log statements. With all the noise it gets pretty difficult to filter out your own log statements. One way is to prefix your statements with &amp;#8220;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;#8221; or &amp;#8220;==&amp;#8221; (or many more of those). If that doesn&amp;#8217;t even help there is alway the &amp;#8216;tail -f log/development.log | grep =&amp;#8217;. This is not a very workable sollution either. In this case you also miss your request information. Like how long the request takes or what the request parameters are.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been using the following code snippet for a week now and it really meets my need:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;config/initializers/suppress_rails_logging.rb&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
	&lt;li&gt;suppress active record sql logging&lt;br /&gt;
class ActiveRecord::ConnectionAdapters::AbstractAdapter&lt;br /&gt;
  def log_info(*args); end&lt;br /&gt;
end&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
	&lt;li&gt;suppress &amp;#8216;rendered partial &amp;#8230;&amp;#8217; logging&lt;br /&gt;
module ActionView::RenderablePartial&lt;br /&gt;
  def render(view, local_assigns = {})&lt;br /&gt;
    super&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This snippet of code suppresses the ActiveRecord &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; logging statements and the ActionView &amp;#8216;rendered partial &amp;#8230;&amp;#8217;  logging statements. It makes my logs useable again and I still don&amp;#8217;t lose my request information logging statements.&lt;/p&gt;
&lt;p&gt;Try it out and see for yourself wether this works for you. Please leave a comment for any feedback you have.&lt;/p&gt;</description>
      <author>dax.huiberts@holder.nl (Dax Huiberts)</author>
      <category>hor</category>
      <pubDate>Wed, 28 Jul 2010 09:36:48 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/522-Suppress-Rails-logging</link>
      <guid>http://hollandonrails.nl/articles/522-Suppress-Rails-logging</guid>
    </item>
    <item>
      <title>Rails gem: Localized pluralization with i18n</title>
      <description>&lt;p&gt;As you are working on an internalization Rails application, you are maybe using &lt;a href=&quot;http://github.com/joshmh/globalize2&quot;&gt;Globalize2&lt;/a&gt; along with &lt;a href=&quot;http://github.com/svenfuchs/i18n&quot;&gt;I18n&lt;/a&gt; to translate models (e.g. categories). The end-user is probably able to manage the translations in different locales such as Dutch, German, French, Spanish and so forth.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&amp;gt;&amp;gt; I18n.locale
=&amp;gt; :en
&amp;gt;&amp;gt; (c = Category.first).name
=&amp;gt; &quot;birthday&quot;
&amp;gt;&amp;gt; I18n.locale = :nl
=&amp;gt; :nl
&amp;gt;&amp;gt; c.name
=&amp;gt; &quot;verjaardag&quot;
&amp;gt;&amp;gt; I18n.locale = :fr
=&amp;gt; :fr
&amp;gt;&amp;gt; c.name
=&amp;gt; &quot;anniversaire&quot;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you want to display the translation in pluralized form. For instance:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&amp;gt;&amp;gt; I18n.locale
=&amp;gt; :en
&amp;gt;&amp;gt; &quot;Found &quot; + c.name.pluralize
=&amp;gt; &quot;Found birthdays&quot;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;A solution to accomplish this is to translate both singular and plural form:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&amp;gt;&amp;gt; I18n.locale
=&amp;gt; :nl
&amp;gt;&amp;gt; I18n.t(&quot;found&quot;).capitalize + &quot; &quot; + c.name_pluralized
=&amp;gt; &quot;Gevonden verjaardagen&quot;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;There are some cons though:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;you have to translate in singular &lt;span class=&quot;caps&quot;&gt;AND&lt;/span&gt; plural form&lt;/li&gt;
	&lt;li&gt;you have to use two columns (&lt;code&gt;name&lt;/code&gt; and &lt;code&gt;name_pluralized&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;#8217;s some sort of redundancy as we want to keep things &lt;span class=&quot;caps&quot;&gt;DRY&lt;/span&gt;: only translate in singular form and pluralize the translation. Fortunately, there is a Rails gem that does just that:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/archan937/rich_pluralization&quot;&gt;Rich-pluralization&lt;/a&gt; is a &lt;a href=&quot;http://github.com/archan937/e9s&quot;&gt;E9s&lt;/a&gt; module which pluralizes words with inflection rules of the current locale. You can compare it with the &lt;code&gt;ActiveSupport::Inflector&lt;/code&gt;, except that the inflections do not influence the Rails pluralization (which is used for methods as &lt;a href=&quot;http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#M000718&quot;&gt;&lt;code&gt;tableize&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#M000719&quot;&gt;&lt;code&gt;classify&lt;/code&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Looking at our previous example, this is what the implementation can look like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&amp;gt;&amp;gt; I18n.locale
=&amp;gt; :nl
&amp;gt;&amp;gt; I18n.t(&quot;found&quot;).capitalize + &quot; &quot; + c.name.pl
=&amp;gt; &quot;Gevonden verjaardagen&quot;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And of course, you can pluralize static strings:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&amp;gt;&amp;gt; I18n.locale
=&amp;gt; :nl
&amp;gt;&amp;gt; &quot;Fiets&quot;.pl
=&amp;gt; &quot;Fietsen&quot;
&amp;gt;&amp;gt; &quot;MUSEUM&quot;.pl
=&amp;gt; &quot;MUSEA&quot;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;Please note: the letter casing stays preserved(!)&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;All in all, using Rich-pluralization provides you to only translate in singular form and call &lt;code&gt;.pl&lt;/code&gt; for the pluralized translation. Now isn&amp;#8217;t that a &lt;span class=&quot;caps&quot;&gt;DRY&lt;/span&gt; implementation?&lt;/p&gt;
&lt;p&gt;At the moment, Rich-pluralization is shipped with Dutch inflections. It covers 86% of the 54977 words provided by &lt;a href=&quot;http://www.inl.nl&quot; title=&quot;Institution of Dutch Lexicology&quot;&gt;&lt;span class=&quot;caps&quot;&gt;INL&lt;/span&gt;&lt;/a&gt;. This will increase as the developers are working hard on improving the inflections. Also, you can also add inflections for other locales.&lt;/p&gt;
&lt;p&gt;Please visit the &lt;a href=&quot;http://github.com/archan937/rich_pluralization&quot;&gt;Github project page&lt;/a&gt; if you are interested for more information.&lt;/p&gt;</description>
      <author>paul.engel@holder.nl (Paul Engel)</author>
      <category>hor</category>
      <pubDate>Tue, 27 Jul 2010 01:18:10 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/521-Rails-gem-Localized-pluralization-with-i18n</link>
      <guid>http://hollandonrails.nl/articles/521-Rails-gem-Localized-pluralization-with-i18n</guid>
    </item>
    <item>
      <title>CSS3 Pie: Making your life as a webdesigner a little bit easier</title>
      <description>&lt;p&gt;We all know how it&amp;#8217;s like to create beautiful websites, slice it and see it work in all the major browser, except for Internet Explorer.&lt;/p&gt;
&lt;p&gt;Enter CSS3 Pie: &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; decorations for IE. Jason Johnston of &lt;a href=&quot;327creative.com&quot;&gt;327creative.com&lt;/a&gt; wrote a &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; library which can be used in Internet Explorer with the IE behaviors capability. This library partially adds CSS3 support to IE6/7/8.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;Normally: plays nicely in FF/Safari/Chrome&lt;br /&gt;
&lt;code&gt;
#myElement {
  background: #EEE;
  padding: 2em;
  -moz-border-radius: 1em;
  -webkit-border-radius: 1em;
  border-radius: 1em;
}
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For IE: Rounded borders \o/&lt;br /&gt;
&lt;code&gt;
#myElement {
  ...
  behavior: url(PIE.htc);
}
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;PIE&lt;/span&gt; currently has full or partial support for the following CSS3 features:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;border-radius&lt;/li&gt;
	&lt;li&gt;box-shadow&lt;/li&gt;
	&lt;li&gt;border-image&lt;/li&gt;
	&lt;li&gt;multiple background images&lt;/li&gt;
	&lt;li&gt;linear-gradient as background image&lt;/li&gt;
&lt;/ul&gt;</description>
      <author>johan@holder.nl (Johan Vermeulen)</author>
      <category>hor</category>
      <pubDate>Fri, 23 Jul 2010 09:13:05 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/520-CSS3-Pie-Making-your-life-as-a-webdesigner-a-little-bit-easier</link>
      <guid>http://hollandonrails.nl/articles/520-CSS3-Pie-Making-your-life-as-a-webdesigner-a-little-bit-easier</guid>
    </item>
    <item>
      <title>jQuery Hashchange</title>
      <description>&lt;p&gt;Nowadays web apps do heavily depend on Ajax requests (think GMail).&lt;/p&gt;
&lt;p&gt;As we all know: by using Ajax request we lose the possibility to bookmark specific pages and the possibility to use the back and forward buttons in our browsers because the url doesn&amp;#8217;t change.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://twitter.com/cowboy&quot;&gt;Ban Alman&lt;/a&gt; wrote javascript solution for this problem. Enter &lt;a href=&quot;http://benalman.com/projects/jquery-hashchange-plugin&quot;&gt;jquery-hashchange&lt;/a&gt;.  This jQuery plugin enables very basic bookmarkable #hash history via a cross-browser HTML5 window.onhashchange event.&lt;/p&gt;
&lt;p&gt;Version 1.3 was recently released. Check it out at &lt;a href=&quot;http://github.com/cowboy/jquery-hashchange&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;</description>
      <author>stephan.kaag@holder.nl (Stephan Kaag)</author>
      <category>hor</category>
      <pubDate>Thu, 22 Jul 2010 17:09:31 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/519-jQuery-Hashchange</link>
      <guid>http://hollandonrails.nl/articles/519-jQuery-Hashchange</guid>
    </item>
    <item>
      <title>RubyAndRails Conference 2010</title>
      <description>&lt;p&gt;Yesterday the ticket sale for this year&amp;#8217;s &lt;a href=&quot;http://rubyandrails.eu&quot;&gt;RubyAndRails Conference&lt;/a&gt; (formerly known as &lt;a href=&quot;http://2009.rubyenrails.nl&quot;&gt;RubyEnRails&lt;/a&gt;) has started.&lt;/p&gt;
&lt;p&gt;A new name for the conference, but also a new location. Last year the conference was held at the University of Amsterdam but this year&amp;#8217;s conference will take place at &lt;a href=&quot;http://www.dezwijger.nl/&quot;&gt;Pakhuis de Zwijger&lt;/a&gt;, &lt;a href=&quot;http://rubyandrails.eu/location&quot;&gt;behind central station in Amsterdam&lt;/a&gt;. The conference will be a two day conference on 21 &amp;amp; 22 October 2010 including a &lt;a href=&quot;http://rubyandrails.eu/rumble&quot;&gt;Rails Rumble&lt;/a&gt; on the second conference day.&lt;/p&gt;
&lt;p&gt;The first speaker on the conference has already confirmed, more will follow shortly. You can buy your ticket at the conference website on &lt;a href=&quot;http://rubyandrails.eu&quot;&gt;http://rubyandrails.eu&lt;/a&gt;. Tickets are for sale for &amp;euro; 149,00&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://rubyandrails.eu&quot;&gt;&lt;img src=&quot;http://rubyandrails.eu/images/factuur_logo.png&quot; style=&quot;width: 450px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <author>chiel@chielwester.nl (Chiel Wester)</author>
      <category>hor</category>
      <pubDate>Wed, 21 Jul 2010 09:36:56 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/518-RubyAndRails-Conference-2010</link>
      <guid>http://hollandonrails.nl/articles/518-RubyAndRails-Conference-2010</guid>
    </item>
    <item>
      <title>UKI Simple UI Kit for complex web apps</title>
      <description>&lt;p&gt;I just found out about &lt;a href=&quot;http://ukijs.org/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;UKI&lt;/span&gt;, a javascript framework.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Basically: you stop writing html code, &lt;br /&gt;
and start writing interfaces.&lt;/p&gt;
&lt;p&gt;Now I&amp;#8217;m not sure if I&amp;#8217;m going to use this in production. &lt;br /&gt;
But it has been fun playing around with it.&lt;/p&gt;
&lt;p&gt;Check it out and tell me what you think about it.&lt;/p&gt;</description>
      <author>roy.van.der.meij@holder.nl (Roy van der Meij)</author>
      <category>hor</category>
      <pubDate>Sun, 18 Jul 2010 20:06:18 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/517-UKI-Simple-UI-Kit-for-complex-web-apps</link>
      <guid>http://hollandonrails.nl/articles/517-UKI-Simple-UI-Kit-for-complex-web-apps</guid>
    </item>
    <item>
      <title>Upgrading to rails 3.0</title>
      <description>&lt;p&gt;Seeing as upgrading your &amp;lt;3.0 rails app isn&amp;#8217;t just changing the rails version in your env.rb I started looking for an easier way. &lt;br /&gt;
Scouring through the internet, I stumbled across this little gem + guide: &lt;a href=&quot;http://omgbloglol.com/post/359147788/rails-upgrade-automating-a-portion-of-the-rails-3&quot;&gt;rails-upgrade-automating-a-portion-of-the-rails-3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by Jeremy McAnally. I haven&amp;#8217;t found time to play with it much, but I&amp;#8217;ll definitely look into it more this weekend.&lt;/p&gt;
&lt;p&gt;He also wrote a book &lt;a href=&quot;http://www.railsupgradehandbook.com/?r=rubyinside&quot;&gt;railsupgradehandbook&lt;/a&gt; that gives you the basic tips / tricks to upgrade your app to a rails 3.0 app.&lt;/p&gt;</description>
      <author>daniel.willemse@holder.nl (Daniel Willemse)</author>
      <category>hor</category>
      <pubDate>Fri, 16 Jul 2010 07:43:53 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/516-Upgrading-to-rails-3-0</link>
      <guid>http://hollandonrails.nl/articles/516-Upgrading-to-rails-3-0</guid>
    </item>
    <item>
      <title>Random Scraps</title>
      <description>&lt;p&gt;I didn&amp;#8217;t check my &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; reader for a while, which resulted in a long list of unread posts. This is a summary collection of interesting tidbits.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://www.rubyflow.com/items/4214?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+Rubyflow+(RubyFlow)&quot;&gt;bullet 2.0.0.beta.3 gem released&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;At @holderhq Bullet alongside New Relic saved us loads of time speeding up some database intensive apps. Especially when ActiveRecord magic and ActiveRecord extensions make your development log look like a wizards spell book describing how to fetch green goblins with red hats from middle earth.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://blog.majesticseacreature.com/rmus-secret-sauce-game-mechanics&quot;&gt;Ruby Medicant University Game Mechanics&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Gregory Brown&amp;#8217;s &lt;a href=&quot;http://blog.majesticseacreature.com/tag/rubymendicant&quot;&gt;Ruby Mendicant University&lt;/a&gt; idea is taking off. I think the idea is great and I&amp;#8217;m closely following the progess.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://www.metaskills.net/2010/7/9/interactive-javascript-console-with-textmate&quot;&gt;Javascript Console with TextMate&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I didn&amp;#8217;t have the time to check it out yet. But it looks like &lt;a href=&quot;http://blog.devinterface.com/2010/07/design-patterns-in-ruby-adapter/&quot;&gt;this&amp;#8217;ll certainly help javascript development&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://businessguysonbusinesstrips.com/?p=247&quot;&gt;Corporate Dictionary Part 7&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Plainly funny.&lt;/p&gt;</description>
      <author>wilco@holder.nl (Wilco van Duinkerken)</author>
      <category>hor</category>
      <pubDate>Thu, 15 Jul 2010 09:24:05 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/515-Random-Scraps</link>
      <guid>http://hollandonrails.nl/articles/515-Random-Scraps</guid>
    </item>
    <item>
      <title>Bundler 1.0 without system gems</title>
      <description>&lt;p&gt;The last time I talked about bundler I showed how to use the 0.9 series and everything will be in it&amp;#8217;s own bundler bubble.&lt;br /&gt;
However, starting from bundler 1.0 systems gems will be prefered with sudo installs and this might be not what you want.&lt;/p&gt;
&lt;p&gt;Some perfectly valid reasons might be:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;You are deploying to webservers as an unprivileged user and don&amp;#8217;t want to sudo&lt;/li&gt;
	&lt;li&gt;You don&amp;#8217;t want the existing apps to break because incompatible gems are being installed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was looking at the bundler source code for a solution and found out it was actually quite easy to solve.&lt;br /&gt;
Just add a path after &amp;#8220;bundle install&amp;#8221; !&lt;/p&gt;
&lt;p&gt;So when installing an application on a production server you can let capistrano (or whatever you use for deployments)&lt;br /&gt;
run the following command: bundle install ~/.bundle&lt;/p&gt;
&lt;p&gt;Inside the application a config file will be created and respected.&lt;br /&gt;
This configuration file consists of the following content:&lt;br /&gt;
&lt;code&gt;
--- 
BUNDLE_DISABLE_SHARED_GEMS: &quot;1&quot;
BUNDLE_PATH: /Users/wijnandwiersma/.bundle
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As long as this configuration exists the system gems will not be touched.&lt;/p&gt;
&lt;p&gt;Until recently I wasn&amp;#8217;t a big fan of bundler but because of &lt;a href=&quot;http://vimeo.com/12614072&quot;&gt;this presentation&lt;/a&gt; I fully understand all decisions that made bundler the way it is. I think you should watch it too. I think I will convert some rails 2.3 apps in the near future.&lt;/p&gt;</description>
      <author>wijnand@nedbsd.eu (Wijnand Wiersma)</author>
      <category>hor</category>
      <pubDate>Thu, 15 Jul 2010 09:14:06 +0200</pubDate>
      <link>http://hollandonrails.nl/articles/514-Bundler-1-0-without-system-gems</link>
      <guid>http://hollandonrails.nl/articles/514-Bundler-1-0-without-system-gems</guid>
    </item>
  </channel>
</rss>
