<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Commentaires sur : Nuage de tag avec Ruby On Rails : acts_as_taggable</title>
	<atom:link href="http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/</link>
	<description>Le blog [de l'âge] de Pierre</description>
	<lastBuildDate>Thu, 26 Jan 2012 16:13:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Par : Diesel</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-126476</link>
		<dc:creator>Diesel</dc:creator>
		<pubDate>Mon, 17 Jan 2011 20:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-126476</guid>
		<description>&lt;p&gt;&lt;a href=&quot;http://chrisperezandvanessavillanueva.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;chris perez and vanessa villanueva&lt;/a&gt;
&lt;a href=&quot;http://preteenlsdream.grealtctor.info/&quot; rel=&quot;nofollow&quot;&gt;preteen ls dream&lt;/a&gt;
&lt;a href=&quot;http://wwwapolloonocom.grealtctor.info/&quot; rel=&quot;nofollow&quot;&gt;www apolloono com&lt;/a&gt;
&lt;a href=&quot;http://gerc94925c.grealtco.info/&quot; rel=&quot;nofollow&quot;&gt;ge rc94925 c&lt;/a&gt;
&lt;a href=&quot;http://vergasbuenas.grealtctor.info/&quot; rel=&quot;nofollow&quot;&gt;vergas buenas&lt;/a&gt;
&lt;a href=&quot;http://discounted30carbineammo.grealtco.info/&quot; rel=&quot;nofollow&quot;&gt;discounted 30 carbine ammo&lt;/a&gt;
&lt;a href=&quot;http://albertsonsbakerycakessupermarkets.grealtcyst.info/&quot; rel=&quot;nofollow&quot;&gt;albertsons bakery cakes supermarkets&lt;/a&gt;
&lt;a href=&quot;http://searsmodel536909700age.grealtcyst.info/&quot; rel=&quot;nofollow&quot;&gt;sears model 536 909700 age&lt;/a&gt;
&lt;a href=&quot;http://peliculaspornosdejobencitas.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;peliculas pornos de jobencitas&lt;/a&gt;
&lt;a href=&quot;http://convertcelsiustoferinheight.grealtco.info/&quot; rel=&quot;nofollow&quot;&gt;convert celsius to ferinheight&lt;/a&gt;
&lt;a href=&quot;http://deltaairlinesdealysforsundayfeb28.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;delta airlines dealys for sunday feb 28&lt;/a&gt;
&lt;a href=&quot;http://m1903a4forsale.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;m1903a4 for sale&lt;/a&gt;
&lt;a href=&quot;http://wwekanecoloringpages.grealtcyst.info/&quot; rel=&quot;nofollow&quot;&gt;wwe kane coloring pages&lt;/a&gt;
&lt;a href=&quot;http://buckeesextape.grealtco.info/&quot; rel=&quot;nofollow&quot;&gt;buckee sextape&lt;/a&gt;
&lt;a href=&quot;http://blackgreekparaphernaliajacketsdeltasigmatheta.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;black greek paraphernalia jackets delta sigma theta&lt;/a&gt;
&lt;a href=&quot;http://howtocareforaburgundyficus.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;how to care for a burgundy ficus&lt;/a&gt;
&lt;a href=&quot;http://craigslistdescuido.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;craigslist descuido&lt;/a&gt;
&lt;a href=&quot;http://secretitemaqworlds.grealtctor.info/&quot; rel=&quot;nofollow&quot;&gt;secret item aq worlds&lt;/a&gt;
&lt;a href=&quot;http://biblicalpicturesofarchangels.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;biblical pictures of archangels&lt;/a&gt;
&lt;a href=&quot;http://spartandoubleriflessoldbyremingtonarms.grealtclam.info/&quot; rel=&quot;nofollow&quot;&gt;spartan double rifles sold by remington arms&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="http://chrisperezandvanessavillanueva.grealtclam.info/" rel="nofollow">chris perez and vanessa villanueva</a>
<a href="http://preteenlsdream.grealtctor.info/" rel="nofollow">preteen ls dream</a>
<a href="http://wwwapolloonocom.grealtctor.info/" rel="nofollow">www apolloono com</a>
<a href="http://gerc94925c.grealtco.info/" rel="nofollow">ge rc94925 c</a>
<a href="http://vergasbuenas.grealtctor.info/" rel="nofollow">vergas buenas</a>
<a href="http://discounted30carbineammo.grealtco.info/" rel="nofollow">discounted 30 carbine ammo</a>
<a href="http://albertsonsbakerycakessupermarkets.grealtcyst.info/" rel="nofollow">albertsons bakery cakes supermarkets</a>
<a href="http://searsmodel536909700age.grealtcyst.info/" rel="nofollow">sears model 536 909700 age</a>
<a href="http://peliculaspornosdejobencitas.grealtclam.info/" rel="nofollow">peliculas pornos de jobencitas</a>
<a href="http://convertcelsiustoferinheight.grealtco.info/" rel="nofollow">convert celsius to ferinheight</a>
<a href="http://deltaairlinesdealysforsundayfeb28.grealtclam.info/" rel="nofollow">delta airlines dealys for sunday feb 28</a>
<a href="http://m1903a4forsale.grealtclam.info/" rel="nofollow">m1903a4 for sale</a>
<a href="http://wwekanecoloringpages.grealtcyst.info/" rel="nofollow">wwe kane coloring pages</a>
<a href="http://buckeesextape.grealtco.info/" rel="nofollow">buckee sextape</a>
<a href="http://blackgreekparaphernaliajacketsdeltasigmatheta.grealtclam.info/" rel="nofollow">black greek paraphernalia jackets delta sigma theta</a>
<a href="http://howtocareforaburgundyficus.grealtclam.info/" rel="nofollow">how to care for a burgundy ficus</a>
<a href="http://craigslistdescuido.grealtclam.info/" rel="nofollow">craigslist descuido</a>
<a href="http://secretitemaqworlds.grealtctor.info/" rel="nofollow">secret item aq worlds</a>
<a href="http://biblicalpicturesofarchangels.grealtclam.info/" rel="nofollow">biblical pictures of archangels</a>
<a href="http://spartandoubleriflessoldbyremingtonarms.grealtclam.info/" rel="nofollow">spartan double rifles sold by remington arms</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Par : Halo</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-123744</link>
		<dc:creator>Halo</dc:creator>
		<pubDate>Fri, 12 Nov 2010 17:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-123744</guid>
		<description>&lt;p&gt;&lt;a href=&quot;http://picsofsalmahayek.sionymxx.in/&quot; rel=&quot;nofollow&quot;&gt;pics of salma hayek&lt;/a&gt;
&lt;a href=&quot;http://zenaidaflavaupdates.astalixx.in/&quot; rel=&quot;nofollow&quot;&gt;zenaida flava updates&lt;/a&gt;
&lt;a href=&quot;http://axhayesopereironi.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;axhaye sopere ironi&lt;/a&gt;
&lt;a href=&quot;http://pornfromadelitastj.astalixx.in/&quot; rel=&quot;nofollow&quot;&gt;porn from adelitas tj&lt;/a&gt;
&lt;a href=&quot;http://downvideoclipcachlamtinhsex.raisingxx.in/&quot; rel=&quot;nofollow&quot;&gt;down video clip cach lam tinh sex&lt;/a&gt;
&lt;a href=&quot;http://remingtonspartanspr9412ga3006.cobnutxx.in/&quot; rel=&quot;nofollow&quot;&gt;remington spartan spr94 12ga 30 06&lt;/a&gt;
&lt;a href=&quot;http://watson935pillidentification.astalixx.in/&quot; rel=&quot;nofollow&quot;&gt;watson 935 pill identification&lt;/a&gt;
&lt;a href=&quot;http://verpornomexicanascojiendoconperros.cobnutxx.in/&quot; rel=&quot;nofollow&quot;&gt;ver porno mexicanas cojiendo con perros&lt;/a&gt;
&lt;a href=&quot;http://convert40gramstocups.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;convert 40 grams to cups&lt;/a&gt;
&lt;a href=&quot;http://mlstoounces.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;mls to ounces&lt;/a&gt;
&lt;a href=&quot;http://truyenxxx.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;truyen xxx&lt;/a&gt;
&lt;a href=&quot;http://wwwepayrolltheworknumbercompilgrimspride.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;www epayroll theworknumber com pilgrimspride&lt;/a&gt;
&lt;a href=&quot;http://chisteschistososcortos.raisingxx.in/&quot; rel=&quot;nofollow&quot;&gt;chistes chistosos cortos&lt;/a&gt;
&lt;a href=&quot;http://aclswrittentestanswers.sionymxx.in/&quot; rel=&quot;nofollow&quot;&gt;acls written test answers&lt;/a&gt;
&lt;a href=&quot;http://cvaknifekit.phenatexx.in/&quot; rel=&quot;nofollow&quot;&gt;cva knife kit&lt;/a&gt;
&lt;a href=&quot;http://eccinmatelookuporg.astalixx.in/&quot; rel=&quot;nofollow&quot;&gt;ecc inmatelookup org&lt;/a&gt;
&lt;a href=&quot;http://panochitascalientes.cobnutxx.in/&quot; rel=&quot;nofollow&quot;&gt;panochitas calientes&lt;/a&gt;
&lt;a href=&quot;http://goodpoemusingsimile.cobnutxx.in/&quot; rel=&quot;nofollow&quot;&gt;good poem using simile&lt;/a&gt;
&lt;a href=&quot;http://freetijuanadonkeyshowvideo.boobypaxx.in/&quot; rel=&quot;nofollow&quot;&gt;free tijuana donkey show video&lt;/a&gt;
&lt;a href=&quot;http://50barrett82a1vs82cq.beckohlxx.in/&quot; rel=&quot;nofollow&quot;&gt;50 barrett 82a1 vs 82 cq&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="http://picsofsalmahayek.sionymxx.in/" rel="nofollow">pics of salma hayek</a>
<a href="http://zenaidaflavaupdates.astalixx.in/" rel="nofollow">zenaida flava updates</a>
<a href="http://axhayesopereironi.boobypaxx.in/" rel="nofollow">axhaye sopere ironi</a>
<a href="http://pornfromadelitastj.astalixx.in/" rel="nofollow">porn from adelitas tj</a>
<a href="http://downvideoclipcachlamtinhsex.raisingxx.in/" rel="nofollow">down video clip cach lam tinh sex</a>
<a href="http://remingtonspartanspr9412ga3006.cobnutxx.in/" rel="nofollow">remington spartan spr94 12ga 30 06</a>
<a href="http://watson935pillidentification.astalixx.in/" rel="nofollow">watson 935 pill identification</a>
<a href="http://verpornomexicanascojiendoconperros.cobnutxx.in/" rel="nofollow">ver porno mexicanas cojiendo con perros</a>
<a href="http://convert40gramstocups.boobypaxx.in/" rel="nofollow">convert 40 grams to cups</a>
<a href="http://mlstoounces.boobypaxx.in/" rel="nofollow">mls to ounces</a>
<a href="http://truyenxxx.boobypaxx.in/" rel="nofollow">truyen xxx</a>
<a href="http://wwwepayrolltheworknumbercompilgrimspride.boobypaxx.in/" rel="nofollow">www epayroll theworknumber com pilgrimspride</a>
<a href="http://chisteschistososcortos.raisingxx.in/" rel="nofollow">chistes chistosos cortos</a>
<a href="http://aclswrittentestanswers.sionymxx.in/" rel="nofollow">acls written test answers</a>
<a href="http://cvaknifekit.phenatexx.in/" rel="nofollow">cva knife kit</a>
<a href="http://eccinmatelookuporg.astalixx.in/" rel="nofollow">ecc inmatelookup org</a>
<a href="http://panochitascalientes.cobnutxx.in/" rel="nofollow">panochitas calientes</a>
<a href="http://goodpoemusingsimile.cobnutxx.in/" rel="nofollow">good poem using simile</a>
<a href="http://freetijuanadonkeyshowvideo.boobypaxx.in/" rel="nofollow">free tijuana donkey show video</a>
<a href="http://50barrett82a1vs82cq.beckohlxx.in/" rel="nofollow">50 barrett 82a1 vs 82 cq</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Par : Vicodin without prescription.</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-118400</link>
		<dc:creator>Vicodin without prescription.</dc:creator>
		<pubDate>Tue, 13 Apr 2010 00:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-118400</guid>
		<description>&lt;p&gt;&lt;strong&gt;Vicodin addiction....&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vicodin cod. Vicodin. Vicodin without prescription. Vicodin addiction. Online vicodin....&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>Vicodin addiction&#8230;.</strong></p>

<p>Vicodin cod. Vicodin. Vicodin without prescription. Vicodin addiction. Online vicodin&#8230;.</p>]]></content:encoded>
	</item>
	<item>
		<title>Par : Stoneageblog.com &#187; RubyOnRails et l&#8217;api GoogleMaps</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-17411</link>
		<dc:creator>Stoneageblog.com &#187; RubyOnRails et l&#8217;api GoogleMaps</dc:creator>
		<pubDate>Tue, 11 Dec 2007 22:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-17411</guid>
		<description>&lt;p&gt;[...] Il y a quelques mois j&#8217;ai publié un long article présentant la création d&#8217;une application Rails depuis la première ligne de code jusqu&#8217;à son hébergement sur internet. Quelques temps plus tard je publiai un &#8220;addon&#8221; à cet article présentant l&#8217;ajout d&#8217;un système de nuage de tags et nous voilà aujourd&#8217;hui avec un nouvel ajout afin d&#8217;apprendre à manipuler les fameuses cartes de Google en toute simplicité&#8230; [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Il y a quelques mois j&#8217;ai publié un long article présentant la création d&#8217;une application Rails depuis la première ligne de code jusqu&#8217;à son hébergement sur internet. Quelques temps plus tard je publiai un &#8220;addon&#8221; à cet article présentant l&#8217;ajout d&#8217;un système de nuage de tags et nous voilà aujourd&#8217;hui avec un nouvel ajout afin d&#8217;apprendre à manipuler les fameuses cartes de Google en toute simplicité&#8230; [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Par : Shoghi</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-16022</link>
		<dc:creator>Shoghi</dc:creator>
		<pubDate>Sun, 25 Nov 2007 18:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-16022</guid>
		<description>&lt;p&gt;Super!! comme le premier.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Super!! comme le premier.</p>]]></content:encoded>
	</item>
	<item>
		<title>Par : SoliSoft.net &#187; Blog Archive &#187; acts_as_taggable_on_steroids et will_paginate</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-15064</link>
		<dc:creator>SoliSoft.net &#187; Blog Archive &#187; acts_as_taggable_on_steroids et will_paginate</dc:creator>
		<pubDate>Thu, 15 Nov 2007 17:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-15064</guid>
		<description>&lt;p&gt;[...] Vous trouverez sur le site de Stoneage un tutoriel pour installer acts&#095;as&#095;taggable&#095;on&#095;steroids. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Vous trouverez sur le site de Stoneage un tutoriel pour installer acts&#95;as&#95;taggable&#95;on&#95;steroids. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Par : Pierre Rigal</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-9978</link>
		<dc:creator>Pierre Rigal</dc:creator>
		<pubDate>Mon, 24 Sep 2007 11:20:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-9978</guid>
		<description>&lt;p&gt;Merci pour ces précisions ! &lt;em&gt;Le tuto GoogleMaps est dans mes brouillons Wordpress... in progress&lt;/em&gt; ;)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Merci pour ces précisions ! <em>Le tuto GoogleMaps est dans mes brouillons WordPress&#8230; in progress</em> <img src='http://www.stoneageblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>Par : gdufloux</title>
		<link>http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/comment-page-1/#comment-9962</link>
		<dc:creator>gdufloux</dc:creator>
		<pubDate>Mon, 24 Sep 2007 07:26:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoneageblog.com/articles/2007/06/03/nuage-de-tag-avec-ruby-on-rails-acts_as_taggable/#comment-9962</guid>
		<description>&lt;p&gt;Merci pour le tuto, c&#039;est trés clair ;)&lt;/p&gt;

&lt;p&gt;Quelques remarques (perfectionnistes) sur la performance, suite à la lecture et l&#039;utilisation de &lt;a href=&quot;http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids&quot;&gt;acts&#095;as&#095;taggable&#095;on&#095;steroids&lt;/a&gt;   :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Ajouter les index à la migration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Voir le acts&#095;as&#095;taggable&#095;migration généré par le plugin&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;2. Optimiser le calcul d&#039;occurence des tags&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On calcule t.count.to&#095;i une seule fois si possible, et un &lt;em&gt;if-elsif&lt;/em&gt; évite ici le test de deux conditions exclusives. Un petit &lt;em&gt;1000.times do&lt;/em&gt; sert à comprendre la situation lorsqu&#039;il y a beaucoup de tag ;)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# 1000.times do 
tags.each { &#124;t&#124; 
    count = t.count.to_i
    if count &gt; max 
        max = count
    elsif count &lt; min 
        min = count
    end
}
# end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;2bis. Ou bien utiliser un cache...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Un petit migrate pour ajouter un champ de cache en base :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;add_column :cds, :cached_tag_list, :string
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Puis mettre à jour le cache dans cd_controller.rb lors de create et update :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@cd.save_cached_tag_list
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;ps:&lt;/strong&gt; vivement le tuto sur maps !&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Merci pour le tuto, c&#8217;est trés clair <img src='http://www.stoneageblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>Quelques remarques (perfectionnistes) sur la performance, suite à la lecture et l&#8217;utilisation de <a href="http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids">acts&#95;as&#95;taggable&#95;on&#95;steroids</a>   :</p>

<p><strong>1. Ajouter les index à la migration</strong></p>

<p>Voir le acts&#95;as&#95;taggable&#95;migration généré par le plugin</p>

<pre><code>add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type]
</code></pre>

<p><strong>2. Optimiser le calcul d&#8217;occurence des tags</strong></p>

<p>On calcule t.count.to&#95;i une seule fois si possible, et un <em>if-elsif</em> évite ici le test de deux conditions exclusives. Un petit <em>1000.times do</em> sert à comprendre la situation lorsqu&#8217;il y a beaucoup de tag <img src='http://www.stoneageblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<pre><code># 1000.times do 
tags.each { |t| 
    count = t.count.to_i
    if count &amp;gt; max 
        max = count
    elsif count &amp;lt; min 
        min = count
    end
}
# end
</code></pre>

<p><strong>2bis. Ou bien utiliser un cache&#8230;</strong></p>

<p>Un petit migrate pour ajouter un champ de cache en base :</p>

<pre><code>add_column :cds, :cached_tag_list, :string
</code></pre>

<p>Puis mettre à jour le cache dans cd_controller.rb lors de create et update :</p>

<pre><code>@cd.save_cached_tag_list
</code></pre>

<p><strong>ps:</strong> vivement le tuto sur maps !</p>]]></content:encoded>
	</item>
</channel>
</rss>

