<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
  <id>tag:cnxs.com.br,2007:/rss</id>
  <link rel="alternate" type="text/html" href="http://cnxs.com.br" />
  
  <title>CNXS</title>
  <updated>2008-11-13T15:07:43Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/Cnxs" type="application/atom+xml" /><entry>
    <id>tag:cnxs.com.br,2007:Post/39</id>
    <published>2008-11-13T15:07:43Z</published>
    <updated>2008-11-13T23:38:49Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/how-to-get-better-error-messages-for-a-associated-model" />
    <title>How to get better error messages for an associated model. </title>
    <content type="html">Hey there. Let's assume you have some set like this

&lt;pre&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;User&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="ident"&gt;has_one&lt;/span&gt; &lt;span class="symbol"&gt;:profile&lt;/span&gt; &lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:dependent&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:destroy&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;


&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Profile&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="ident"&gt;belongs_to&lt;/span&gt; &lt;span class="symbol"&gt;:user&lt;/span&gt;
  &lt;span class="ident"&gt;validates_presence_of&lt;/span&gt; &lt;span class="symbol"&gt;:first_name&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:last_name&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;/pre&gt;

&lt;p&gt;
  And you create the profile in the same view as your user.
  How do you validate those first_name and last_name fields
  with a friendly message for your user?
  &lt;br /&gt;
  Well, you could use &lt;a href="http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M001642"&gt;
  validates_associated&lt;/a&gt;, but you would end up with a message like "Profile is
  invalid". Now, how friendly is that?
&lt;/p&gt;

&lt;p&gt;
To obtain a more precise message, use this on you user.rb
&lt;/p&gt;

&lt;pre&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;validate&lt;/span&gt;
  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;profile&lt;/span&gt;
    &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;profile&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;errors&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;error&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
      &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;errors&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;add_to_base&lt;/span&gt; &lt;span class="ident"&gt;error&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/38</id>
    <published>2008-11-12T20:34:06Z</published>
    <updated>2008-11-13T17:47:28Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/security-idea-for-banking-cards" />
    <title>Security idea for banking cards</title>
    <content type="html">&lt;p&gt;I'm a brazilian, and on our big cities we have a type of crime known as flash kidnap (&amp;quot;sequestro rel&amp;acirc;mpago&amp;quot; in portuguese), which is a crime that consists in one kidnapper taking a hostage and cruising around with him (probably on the hostage's own car) and forcing the victim to release his banking account numbers so money can be drawn from his banking account.&lt;/p&gt; &lt;p&gt;This type of crime is basically a problem that was induced by the introduction of a technology (bank credit cards). But this technology could be made safer by the introduction of an emergency number. This number would work just as the normal one, so there is plausible deniability for the victim, so money could be drawn and all, but if ever used it would raise alarms on the credit central, and the authorities could be immediately called. Since close to 100% of the ATM machines have cameras around them, and there is the location of the drawn, it would be easy to check where criminals are.&lt;/p&gt; &lt;p&gt;For example:&lt;/p&gt; &lt;p&gt;Bob uses a banking card and has 2 passwords (pass A and pass B). Bob uses pass A on his day-to-day, without a hassle. Some day Eve kidnaps Bob, and forces him do release his card and a password. Bob releases pass B. Eve uses Bob's card with pass B without a problem, but doing so warns Alice that there is an emergency happening with Bob (possibly a kidnap). Alice warns the authorities.&lt;/p&gt; &lt;p&gt;I'm not interested in making money at all with this idea, but I would like to see it implemented, so it perhaps could save some property and lifes, so I'm asking for some directions as to what the heck I should do with it, and also some criticism.&lt;/p&gt; &lt;p&gt;This idea is registered under &lt;a href="http://creativecommons.org/licenses/by-nc/2.5/br/deed.en_US"&gt;CC Attribution-Noncommercial 2.5 Brazil&lt;/a&gt;&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/37</id>
    <published>2008-11-03T22:10:35Z</published>
    <updated>2008-11-03T23:40:05Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/startup-school-2008" />
    <title>Startup school 2008</title>
    <content type="html">&lt;p&gt;Quick link to some valuable resource...&lt;/p&gt; &lt;p&gt;&lt;a href="http://omnisio.com/startupschool08"&gt;Startup school 2008!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Ahhh, we here at cnxs are busy learning some new exciting technology, so keep you heads up for some fresh new content soon....&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/36</id>
    <published>2008-10-28T03:55:15Z</published>
    <updated>2008-11-13T19:50:56Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/difference-between-is_a-and-instance_of" />
    <title>Difference between is_a? and instance_of?</title>
    <content type="html">&lt;p&gt;Hi Sirs.&lt;/p&gt; &lt;p&gt;There is a difference between a bunch of methods that appear that they to the same job, but they won't.&lt;/p&gt; &lt;p&gt;The methods &lt;em&gt;instance_of?&lt;/em&gt;, &lt;em&gt;is_a?&lt;/em&gt; and &lt;em&gt;kind_of?&lt;/em&gt; do related jobs, but not the same job.&lt;/p&gt; &lt;p&gt;For example &lt;em&gt;is_a?&lt;/em&gt; and &lt;em&gt;kind_of?&lt;/em&gt; do the same job, they return true if the caller is an instance of the method argument, if the caller is an instance of every superclass in his inheritance tree or if the argument method is a module included in the caller.&lt;/p&gt; &lt;p&gt;The &lt;em&gt;instance_of?&lt;/em&gt; is more specific, it returns true just if the caller is an instance of the method argument.&lt;/p&gt;  &lt;p&gt;Let me show some examples:&lt;/p&gt;  

&lt;pre&gt;&lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;Hand&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Animal&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Mamal&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;Animal&lt;/span&gt;
  &lt;span class="ident"&gt;include&lt;/span&gt; &lt;span class="constant"&gt;Hand&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Dog&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;Mamal&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="ident"&gt;dog&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;

&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_of?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Dog&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;    &lt;span class="comment"&gt;# true&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_of?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Mamal&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;  &lt;span class="comment"&gt;# false&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_of?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Animal&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="comment"&gt;# false&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;instance_of?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Hand&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;   &lt;span class="comment"&gt;# false&lt;/span&gt;

&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;is_a?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Dog&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;    &lt;span class="comment"&gt;# true&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;is_a?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Mamal&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;  &lt;span class="comment"&gt;# true&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;is_a?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Animal&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="comment"&gt;# true&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;dog&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;is_a?&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;Hand&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;   &lt;span class="comment"&gt;# true &lt;/span&gt;

&lt;/pre&gt;

&lt;p&gt;Remember that &lt;em&gt;is_a?&lt;/em&gt; and &lt;em&gt;kind_of?&lt;/em&gt; do the same job.&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/35</id>
    <published>2008-10-24T02:21:52Z</published>
    <updated>2008-10-24T02:42:47Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rails-summit-latin-america-2008-review-day-2" />
    <title>Rails Summit Latin America 2008 - Review Day 2</title>
    <content type="html">&lt;p&gt;Second Day of Rails Summit, started hot. &lt;strong&gt;Phusion&lt;/strong&gt; guys talked about Scaling Applications, what are the problems, bottlenecks, solutions, how's the possibilities to face it. Was very good and entertaining, specially when Darth Vader come into it. Slides were good with funny animations.&lt;/p&gt; &lt;p&gt;After that comes &lt;strong&gt;Charles Nutter e Thomas Enebo&lt;/strong&gt; talkin on JRuby and because the technical problems during the virtual presentation, left an impression that could be better. They gave an overview of the status of JRuby, how it runs on hotspot, and also presented some (strange) numbers of memory usage in JRuby comparing to MRI.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Jay Fields&lt;/strong&gt; talking was about testing and some testing frameworks. Well in general was a good presentation but for him almost all solutions are imature, which I disagree and when he was questioned on what makes a framework mature, he said time, years...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;David Chelimsky&lt;/strong&gt; did 2 great talkings one about RSpec and the other about Cucumber, much more for newbies (with all respect to newbies it's just a stage). I liked a lot because he seem to be very confident on his arguments, this is a thing that I appreciate on speakers.&lt;/p&gt; &lt;p&gt;&lt;img alt="David Chelimsky and CNXS Team" src="../../images/david-chelimsky-rails-summit-latin-america-2008.jpg" title="David Chelimsky and CNXS Team" /&gt;&lt;/p&gt; &lt;p&gt;The others between Chelimsky's and Obie I didn't payed too much attention so I'll skip my review on them.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Obie Fernandez&lt;/strong&gt; closed the event with a great keynote, telling about how his software consultancy deals with the agile manifesto. It's great to hear that you apply the techniques that he says that's a key of success of his company. He presented a full stack of the way his company develop software, since the first contact to the client.&lt;/p&gt; &lt;p&gt;&lt;img alt="Rafael Souza and Obie Fernandez" src="../../images/obie-fernandez-rails-summit-latin-america-2008.jpg" title="Rafael Souza and Obie Fernandez" /&gt;&lt;/p&gt; &lt;p&gt;Rails Summit for me was a great event, that I've met good mates from the brazilian and latin america Rails community. I will be waiting for the next one on 2009!&lt;/p&gt; &lt;p&gt;&lt;img alt="Carlos Brando, F&amp;aacute;bio Akita and CNXS Team" src="../../images/carlos-brando-fabio-akita-rails-summit-latin-america-2008.jpg" title="Carlos Brando, F&amp;aacute;bio Akita and CNXS Team" /&gt;&lt;/p&gt;</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/34</id>
    <published>2008-10-21T13:18:30Z</published>
    <updated>2008-11-13T19:49:58Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/diff-entre-respond_to-e-respond_to" />
    <title>Diff entre respond_to? e respond_to</title>
    <content type="html">&lt;p&gt;Um pequeno tutorial em portugu&amp;ecirc;s pra diferenciar melhor &lt;em&gt;respond_to?&lt;/em&gt; e &lt;em&gt;respond_to&lt;/em&gt;. N&amp;atilde;o parece ter muita n&amp;atilde;o? Mas o tio Chuck Norris vai me ajudar a esclarecer melhor isso aqui.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ruby-doc.org/core/classes/Object.html#M000333"&gt;respond_to?&lt;/a&gt; &amp;eacute; um m&amp;eacute;todo do Ruby Core como voc&amp;ecirc; pode ver, e n&amp;atilde;o do Ruby On Rails, ele basicamente verifica se determinado objeto responde a um m&amp;eacute;todo, como o nome sugere mesmo.&lt;/p&gt; &lt;p&gt;Por exemplo:&lt;/p&gt; 
&lt;/pre&gt;&lt;pre&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Chuck&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;Object&lt;/span&gt;
  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;norris&lt;/span&gt;
    &lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;the man&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="ident"&gt;chuck_norris&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Chuck&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;
&lt;span class="ident"&gt;p&lt;/span&gt; &lt;span class="ident"&gt;chuck_norris&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;respond_to?&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;norris&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt; &lt;span class="comment"&gt;# true&lt;/span&gt;
&lt;span class="ident"&gt;p&lt;/span&gt; &lt;span class="ident"&gt;chuck_norris&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;respond_to?&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;mr_t&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt; &lt;span class="comment"&gt;# false&lt;/span&gt;
&lt;/pre&gt;

 &lt;p&gt;J&amp;aacute; o &lt;a href="http://api.rubyonrails.org/classes/ActionController/MimeResponds/InstanceMethods.html#M000206"&gt;respond_to&lt;/a&gt;, sem o ponto de interroga&amp;ccedil;&amp;atilde;o (eles fazem parte do nome do m&amp;eacute;todo) faz parte do ActionController do Ruby On Rails. Ele coloca suporte a Web Service na sua aplica&amp;ccedil;&amp;atilde;o, isso quer dizer que ele consegue resolver o tipo do recurso que voc&amp;ecirc; deseja.&lt;/p&gt; 

&lt;pre&gt;&lt;span class="ident"&gt;respond_to&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;html&lt;/span&gt; &lt;span class="comment"&gt;# render por default nome_da_acao.html.erb&lt;/span&gt;
  &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;js&lt;/span&gt; &lt;span class="comment"&gt;# render o nome_da_acao.rjs&lt;/span&gt;
  &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;xml&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="ident"&gt;render&lt;/span&gt; &lt;span class="symbol"&gt;:xml&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@chuck&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_xml&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt; &lt;span class="comment"&gt;# coloca o chuck pra xml e envia&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Com esse c&amp;oacute;digo na action voc&amp;ecirc; poderia usar, por exemplo:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;http://localhost:3000/nome_da_acao.html&lt;code&gt;&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt; &lt;pre&gt;&lt;code&gt;http://localhost:3000/nome_da_acao.xml&lt;code&gt;&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Ou realizar uma chamada JS unobstrusive usando AJAX.&lt;/p&gt; &lt;p&gt;Isso ai, espero ter ajudado.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/33</id>
    <published>2008-10-21T03:10:18Z</published>
    <updated>2008-10-21T03:59:01Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rails-summit-latin-america-2008-review-day-1" />
    <title>Rails Summit Latin America 2008 - Review Day 1</title>
    <content type="html">&lt;p&gt;Rails Summit Latin America 2008 was a great event at all. Nice speakers, nice people all around, good food. Only the weather wasn't so fine (above 30 C).&lt;/p&gt; &lt;p&gt;The event started with DHH talking on new features of Ruby On Rails 2.2 answering questions of the crowd. I didn't liked it too much, mostly common questions with common answers by him, nothing special.&lt;/p&gt; &lt;p&gt;&lt;img alt="DHH on Rails Summit Latin America 2008" src="../../images/dhh-rails-summit-latin-america-2008.jpg" title="DHH on Rails Summit Latin America 2008" /&gt;&lt;/p&gt; &lt;p&gt;Then Chad Fowler comes and well really debut the event, he made an awesome presentation about be remarkable, talking about his book &amp;quot;My Job Went to India&amp;quot;, his life as a musician and Doom player :-)&lt;/p&gt; &lt;p&gt;&lt;img alt="Chad Fowler on Rails Summit Latin America 2008" src="../../images/chad-fowler-rails-summit-latin-america-2008.jpg" title="Chad Fowler on Rails Summit Latin America 2008" /&gt;&lt;/p&gt; &lt;p&gt;After lunch, George Malamidis talked about REST. I didn't liked too much, was hard to me after lunch pay attention, after 9 hours driving in day before and an early wake up for the event.&lt;/p&gt; &lt;p&gt;Dr Nic Williams talked on Open Source and encouraged people to contribuite more to Open Source Projects. Dr Nic Williams presented a very funny talk and I think if he could take a shot on a Saturday Night Live, if he don't want to be a developer anymore. He's the Jerry Seinfield of Ruby On Rails community.&lt;/p&gt; &lt;p&gt;&lt;img alt="Dr Nic on Rails Summit Latin America 2008" src="../../images/dr-nic-rails-summit-latin-america-2008.jpg" title="Dr Nic on Rails Summit Latin America 2008" /&gt;&lt;/p&gt; &lt;p&gt;Chris Wanstrath, his keynote was very similar to Ruby Hoedown keynote (good IMO, but I expected a little different).&lt;/p&gt; &lt;p&gt;The summit ends the first day with a Birds of Feather were some participants presented random thoughts, Eduardo Bellani also gave his presentation at this time. This whole BoF was one of the funniest moments at Rails Summit Latin America 2008.&lt;/p&gt;</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/32</id>
    <published>2008-10-20T06:26:42Z</published>
    <updated>2008-10-20T06:39:18Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/eduardo-bellani-on-rails-summit-latin-america-2008" />
    <title>Eduardo Bellani on Rails Summit Latin America 2008</title>
    <content type="html">&lt;p&gt;Apresenta&amp;ccedil;&amp;atilde;o de Eduardo Bellani sobre voto eletr&amp;ocirc;nico no Rails Summit Latin America 2008, em S&amp;atilde;o Paulo.&lt;/p&gt; &lt;p&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/sjG5B1xSSp8&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/sjG5B1xSSp8&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/31</id>
    <published>2008-10-10T19:36:50Z</published>
    <updated>2008-10-20T20:55:40Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/vota-o-caixa-preta" />
    <title>Votação caixa preta (Black box voting)</title>
    <content type="html">&lt;p&gt;For the english readers (if any) =&amp;gt; sorry, this one will be in portuguese (except the article with a ++ in front)&lt;/p&gt; &lt;p&gt;Aqui embaixo vai uma colet&amp;acirc;nea de artigos sobre esse assunto (revisitei de novo o esquema de vota&amp;ccedil;&amp;atilde;o digital depois de assitir este &lt;a href="http://en.wikipedia.org/wiki/Hacking_Democracy"&gt;document&amp;aacute;rio&lt;/a&gt;, o qual recomendo fortemente). Pretendo escrever algum artigo a respeito futuramente, mas n&amp;atilde;o pude deixar de compartilhar estas fontes, dada a gravidade deste assunto:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://voto-e.blogspot.com/2006/07/urna-eletrnica-e-os-ciberbobos.html"&gt;entrevista com um especialista brasileiro&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.avirubin.com/vote.pdf"&gt;++Analysis of an Electronic Voting System&lt;/a&gt;, artigo que &amp;eacute; citado no document&amp;aacute;rio sobre a fragilidade do sistema eleitoral americano&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cic.unb.br/docentes/pedro/trabs/analise_setup.html"&gt;vers&amp;atilde;o tupiniquim inpirada no artigo acima&lt;/a&gt;&lt;/li&gt; &lt;li&gt;neste &lt;a href="http://voto-e.blogspot.com/2007/06/voto-eletrnico-viagra-para-eleitores.html"&gt;aqui&lt;/a&gt;, o nome diz tudo&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.brunazo.eng.br/voto-e/livros/FeD.htm"&gt;livro&lt;/a&gt; dispon&amp;iacute;vel sobre fraudes na urna eleitoral brasileira&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;N&amp;atilde;o esque&amp;ccedil;am, ser um l&amp;iacute;der nada mais &amp;eacute; do que agir pensando no coletivo, e por incr&amp;iacute;vel que pare&amp;ccedil;a n&amp;oacute;s (uso essa palavra pra descrever todo mundo que esteja lendo um blog sobre tecnologia como este) somos a elite de nossa sociedade, e isso implica em agirmos como l&amp;iacute;deres, sob pena de ruir a mesma com nossa apatia.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/30</id>
    <published>2008-09-29T17:49:28Z</published>
    <updated>2008-10-15T18:04:37Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/new-article-on-pedagogical-development" />
    <title>New article on pedagogical development</title>
    <content type="html">&lt;p&gt;Hey there readers.&lt;/p&gt;&lt;p&gt;I've written a new small article, and I'm not even sure on what do to with it (if someone has a clue, drop me a line).&lt;/p&gt;&lt;p&gt;It's based on the works of Seymour Papert and constructionism.&lt;/p&gt;&lt;p&gt;Anyway, &lt;a href="../../learning_curve.pdf"&gt;here&lt;/a&gt; it is.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/29</id>
    <published>2008-09-24T13:24:53Z</published>
    <updated>2008-09-24T13:25:37Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rails-summit-latin-america-by-locaweb" />
    <title>Rails Summit Latin America by Locaweb</title>
    <content type="html">&lt;a href="http://site.locaweb.com.br/railssummit/default.asp" target="_blank"&gt;&lt;img alt="Rails Summit Latin America" border="0" height="60" src="http://site.locaweb.com.br/images/locaweb/pt_BR/railssummit/banners/468x60.gif" title="Rails Summit Latin America" width="468" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt; Here we go!</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/28</id>
    <published>2008-07-28T23:43:52Z</published>
    <updated>2008-10-29T17:30:41Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/my-thesis-short-article" />
    <title>My thesis short article</title>
    <content type="html">&lt;p&gt;Hey there. I've closed college (finally) and for the last project we had to built an extensive conclusion work and an article on this work.&lt;/p&gt;&lt;p&gt;The full length work is in portuguese, so it's a bit inaccessible to most readers, but I've tried to write the article in english, since it was permitted and it increased the potential reader base.&lt;/p&gt;&lt;p&gt;So &lt;a href="../../a-new-production-model-for-the-competition-in-a-progressively-more-integrated-world.pdf"&gt;here&lt;/a&gt; it is. It's about using the Getting Real philosophy as a way to be competitive in an ever increasingly competitive and integrated world. Hope you guys enjoy it, and any grammar mistakes, please point them out, english is not my first language, and mistakes do happen :P&lt;/p&gt;&lt;p&gt;Hugs&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/27</id>
    <published>2008-07-08T17:12:49Z</published>
    <updated>2008-11-13T19:54:17Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/export-the-database-models-to-yml-fixtures" />
    <title>Export the database models to YML fixtures</title>
    <content type="html">&lt;p&gt;Hi Sirs,&lt;/p&gt; &lt;p&gt;Many tutorials over the web shows how to load data from fixtures. But, if you want to migrate your &lt;em&gt;mysql&lt;/em&gt; data to a &lt;em&gt;postgresql&lt;/em&gt; database?&lt;/p&gt; &lt;p&gt;We can export our data to fixtures, and after that we can load the fixtures to every database management system we wish.&lt;/p&gt; &lt;p&gt;Let's go to the rake task:&lt;/p&gt;

&lt;pre&gt;&lt;span class="ident"&gt;desc&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;export the database models to YML fixtures&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; 
&lt;span class="ident"&gt;task&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:models_to_fixtures&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:environment&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; 
  &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;establish_connection&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;
    &lt;span class="symbol"&gt;:adapter&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;postgresql&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="comment"&gt;# mysql, sqlite3&lt;/span&gt;
    &lt;span class="symbol"&gt;:encoding&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;utf8&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;
    &lt;span class="symbol"&gt;:database&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;cnxs_development&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;
    &lt;span class="symbol"&gt;:username&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;username&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;
    &lt;span class="symbol"&gt;:password&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;secret&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;connection&lt;/span&gt;

  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="constant"&gt;ENV&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;MODELS&lt;/span&gt;&lt;span class="punct"&gt;'].&lt;/span&gt;&lt;span class="ident"&gt;nil?&lt;/span&gt; &lt;span class="punct"&gt;||&lt;/span&gt; &lt;span class="constant"&gt;ENV&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;MODELS&lt;/span&gt;&lt;span class="punct"&gt;'].&lt;/span&gt;&lt;span class="ident"&gt;blank?&lt;/span&gt;
    &lt;span class="keyword"&gt;raise&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Please enter valid models names separated by coma. Ex: MODELS=User,Account&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="ident"&gt;models&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;ENV&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;MODELS&lt;/span&gt;&lt;span class="punct"&gt;'].&lt;/span&gt;&lt;span class="ident"&gt;split&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;,&lt;/span&gt;&lt;span class="punct"&gt;').&lt;/span&gt;&lt;span class="ident"&gt;collect&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;arg&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt; &lt;span class="ident"&gt;arg&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;camelize&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;constantize&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;

  &lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;model&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
    &lt;span class="ident"&gt;output&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;{}&lt;/span&gt;
    &lt;span class="ident"&gt;collection&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;model&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:all&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="ident"&gt;collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;object&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
      &lt;span class="ident"&gt;output&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;store&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;object&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_param&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;object&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;attributes&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
    &lt;span class="ident"&gt;file_path&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="expr"&gt;#{RAILS_ROOT}&lt;/span&gt;/tmp/&lt;span class="expr"&gt;#{model.table_name}&lt;/span&gt;.yml&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="comment"&gt;# /tmp/&lt;/span&gt;
    &lt;span class="constant"&gt;File&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;open&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;file_path&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;w+&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;file&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt; &lt;span class="ident"&gt;file&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;write&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;output&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;to_yaml&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Here you need to fill your database attributes like you do in the &lt;em&gt;/config/database.yml&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;You will call the command line:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ rake models_to_fixtures MODELS=&amp;lt;your model names separated by coma&amp;gt;&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ rake models_to_fixtures MODELS=User,Post&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All your model data will be stored on &lt;em&gt;/tmp/&lt;/em&gt; directory.&lt;/p&gt; &lt;p&gt;Download this rake task &lt;a href="../../models_to_fixtures.rake"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/26</id>
    <published>2008-06-26T13:58:57Z</published>
    <updated>2008-10-24T04:29:31Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/better-than-grep-you-bet" />
    <title>Better than grep? You bet!</title>
    <content type="html">&lt;p&gt;Well, long time no post here.&lt;/p&gt; &lt;p&gt;I'm going to talk about a tool that changed the way I do search on the programming front.&lt;/p&gt; &lt;p&gt;Since I really don't like grep for common searches (it's a great tool but it's interface is a bit clunky) I used to use the &lt;a href="http://regexxer.sourceforge.net/" title="Regexxer"&gt;Regexxer&lt;/a&gt; for those kind of project searches (it's a great GUI tool, I recommend it to anyone).&lt;/p&gt; &lt;p&gt;But since I'm more of a minimalist command line kind of guy, I was happy as a &lt;a href="http://en.wikipedia.org/wiki/Bonobo" title="Happy monkey"&gt;bonobo&lt;/a&gt; when I found &lt;a href="http://petdance.com/ack/" title="Ack makes me happy, Bonobo style"&gt;ack&lt;/a&gt;, a grep like program hat has a interface for human beings (yeah, ubuntu reference, sue me). To give a little example on how simple is to search in a ruby project for example:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;cd ~/project/path&lt;/code&gt;&lt;/pre&gt; &lt;pre&gt;&lt;code&gt;ack-grep --ruby string_to_be_searched&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;And that's it, if you want any more details, the &lt;a href="http://petdance.com/ack/" title="again, a cool link"&gt;ack&lt;/a&gt; home page has a great little tutorial.&lt;/p&gt; &lt;p&gt;Hugs everyone.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/25</id>
    <published>2008-06-24T16:01:13Z</published>
    <updated>2008-10-20T21:02:53Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/windows-in-ubuntu-8-04-with-virtualbox" />
    <title>Windows in Ubuntu 8.04 with VirtualBox</title>
    <content type="html">&lt;p&gt;I have a Windows on my machine, cause for some stuff I still need it, (MS Visio, MindMaps and couple of others application that doesn't run fine with Wine). It's a pain in the ass to always boot machine to access 2 or 3 files and stay 15 minutes on Windows.&lt;/p&gt; &lt;p&gt;A couple of years ago I was a big fan of &lt;a href="http://www.vmware.com/" title="VMware" target="_blank"&gt;VMware&lt;/a&gt; (old times that I virtualize ubuntu on windows), and I felt a lack of OSS on this area. So the solution it's virtualization, with &lt;a href="http://www.virtualbox.org" title="VirtualBox" target="_blank"&gt;VirtualBox&lt;/a&gt; it all comes easy!&lt;/p&gt; &lt;p&gt;VirtualBox, was recently bought by Sun, has 2 licenses: one commercial and one open source. I use OSE and to install it you have to follow these steps:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install virtualbox-ose virtualbox-ose-modules-generic&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Then add your current user on 'vboxusers'&amp;nbsp; group&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo adduser someuser vboxusers&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Go to applications &amp;gt; system tools &amp;gt; VirtualBox&lt;/p&gt; &lt;p&gt;Now create your Windows VM with the almost NNF (next, next,finish) wizard. It's a piece of cake!&lt;/p&gt;</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/24</id>
    <published>2008-06-18T13:38:37Z</published>
    <updated>2008-11-13T19:57:28Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rspec-view-test-for-partial-with-locals" />
    <title>RSpec view test for render :partial with :locals?</title>
    <content type="html">&lt;p&gt;I was working on some rspec views tests and I've noticed that partial renderization can be tricky.&lt;/p&gt; &lt;p&gt;For example, if we have an index page that renders the objects list in a partial template.&lt;/p&gt; &lt;p&gt;In my case I was testing using a 'GivingClub' list:&lt;/p&gt; 

&lt;pre&gt;&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;giving_clubs&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;before&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="attribute"&gt;@giving_clubs&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="ident"&gt;mock_model&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;GivingClub&lt;/span&gt;&lt;span class="punct"&gt;)]&lt;/span&gt;
    &lt;span class="ident"&gt;assigns&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:giving_clubs&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="attribute"&gt;@giving_clubs&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="ident"&gt;it&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;expect render giving clubs list&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="ident"&gt;template&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;expect_render&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:partial&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/giving_clubs/list&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:locals&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="symbol"&gt;:giving_clubs&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@giving_clubs&lt;/span&gt; &lt;span class="punct"&gt;})&lt;/span&gt;
    &lt;span class="ident"&gt;render&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/giving_clubs/index&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Do not forget the assigns before call template.expect_render. Locals works fine in this way.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/23</id>
    <published>2008-05-13T12:12:26Z</published>
    <updated>2008-05-13T12:14:40Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/hp-acquired-eds" />
    <title>HP Acquired EDS</title>
    <content type="html">&lt;p&gt;Well another big player buying other big player. Big acquisitions in the last couple of months! For around $13 billion ($25 per share). HP said that they could double their service revenue. Well seems that market doesn't believe too much in HP since their shares are down on 6% now...&amp;nbsp;&lt;/p&gt;&lt;p&gt;Source: &lt;a href="http://www.marketwatch.com/news/story/hp-acquire-eds-139-billion/story.aspx?guid=%7B1678B521%2D7B0E%2D47A7%2D90EF%2D7AE3A725ABE9%7D" target="_blank"&gt;market watch&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/22</id>
    <published>2008-03-02T12:51:19Z</published>
    <updated>2008-10-24T04:19:37Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/clean-objects-with-find-method" />
    <title>Clean Objects with find method</title>
    <content type="html">&lt;p&gt;Hi Sirs.&lt;/p&gt; &lt;p&gt;An important trick on the famous ActiveRecord::Base find method.&lt;/p&gt; &lt;p&gt;When you are in development time of your application, and you do some query on your database query editor, is a good practice to use the limit clauses and selects just the columns you want.&lt;/p&gt; &lt;p&gt;In the find method we can do it with the :limit and :select arguments.&lt;/p&gt; &lt;p&gt;For example in our code when we try to authenticate some user we got it like:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;find(:first, :conditions =&amp;gt; [query, hash], :select =&amp;gt; &amp;quot;id, email, login&amp;quot;)&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The returned object contains just the id, email and login attributes. Clean object.&lt;/p&gt; &lt;p&gt;Password and other attributes do not appears in the returned object =]&lt;/p&gt; &lt;p&gt;Simple development practice, but very important too.&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/21</id>
    <published>2008-02-21T20:05:53Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rspec-quickref" />
    <title>Rspec quickref</title>
    <content type="html">&lt;p&gt;Hey wanderers  &lt;/p&gt;&lt;p&gt;Sorry for all this time frozen, the crew and I have a lot to post about, but our current assignments has kept everyone pretty busy(but that's not an excuse, so let me blow the dust off this blog).&lt;/p&gt;&lt;p&gt;So, just stumbled on &lt;a href="http://blog.daveastels.com/"&gt;Dave Astels&lt;/a&gt; (for those of you who don't know the guy, he's one of the responsible for the creation of the rspec behavior driven development framework, I'll post more specifically about it later, but you can find tons of info on the web about it) rspec &lt;a href="http://blog.daveastels.com/files/QuickRef.pdf"&gt;QuickRef&lt;/a&gt;. For those of us who are using rspec a lot, this might come in handy. I know it did for me.  &lt;/p&gt;&lt;p&gt;Just a tip this time folks, but I'll try and get some cooler tutorial next time.&lt;/p&gt;&lt;p&gt;Hugs to you all&amp;nbsp;&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/20</id>
    <published>2008-02-05T09:18:31Z</published>
    <updated>2008-10-24T04:30:33Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/installing-rmagick-on-ubuntu" />
    <title>Installing RMagick on Ubuntu</title>
    <content type="html">&lt;p&gt;Last week I was installing again rmagick on a Ubuntu server, then I discovered an very easy way to do it.&lt;/p&gt; &lt;pre&gt;&lt;strike&gt;&lt;code&gt;$ sudo aptitude install librmagick-ruby&lt;/code&gt;&lt;/strike&gt;&lt;/pre&gt; &lt;p&gt;Edit 10/20/08:&amp;nbsp;Avoid this tutorial it doesn't work, if you wanna install rmagick use the old fashion way:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install imagemagick&lt;/code&gt;&lt;/pre&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install libmagick9-dev&lt;/code&gt;&lt;/pre&gt; &lt;pre&gt;&lt;code&gt;$ sudo gem install rmagick&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/19</id>
    <published>2008-01-28T13:19:07Z</published>
    <updated>2008-10-24T04:33:15Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/sql-lite-for-ruby-on-rails" />
    <title>SQL Lite for Ruby On Rails</title>
    <content type="html">&lt;p&gt;Hi all.&lt;/p&gt; &lt;p&gt;If your Operacional System is Ubuntu and you are using Ruby on Rails 2.0.2 you can easily use it:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install sqlite3&lt;/code&gt;&lt;/pre&gt; &lt;pre&gt;&lt;code&gt;$ sudo gem install sqlite3-ruby&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;SQLite3 does not use authentication and needs only a pointer to the database file on database yml.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;development:&lt;br /&gt;&amp;nbsp; adapter: sqlite3&lt;br /&gt;&amp;nbsp; database: db/development.sqlite3&lt;br /&gt;&amp;nbsp; timeout: 5000&lt;br /&gt;test:&lt;br /&gt;&amp;nbsp; adapter: sqlite3&lt;br /&gt;&amp;nbsp; database: db/test.sqlite3&lt;br /&gt;&amp;nbsp; timeout: 5000&lt;br /&gt;production:&lt;br /&gt;&amp;nbsp; adapter: sqlite3&lt;br /&gt;&amp;nbsp; database: db/production.sqlite3&lt;br /&gt;&amp;nbsp; timeout: 5000&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;When you run &amp;quot;rake db:create:all&amp;quot; on your RAILS_ROOT it creates all 3 databases.&lt;/p&gt; &lt;p&gt;More information about other plataforms?&lt;/p&gt; &lt;p&gt;Here: &lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseSQLite"&gt;http://wiki.rubyonrails.org/rails/pages/HowtoUseSQLite&lt;/a&gt;&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/18</id>
    <published>2008-01-23T18:21:26Z</published>
    <updated>2008-11-13T20:12:31Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/atom-feed-helper-example" />
    <title>Atom Feed Helper Example</title>
    <content type="html">Hi all,&lt;br /&gt;Rails 2 makes the Atom RSS Feed much more sophisticated and elegant. If you are using the Ruby on Rails by RubyGems installer, maybe you have an old version of the Atom Feed Helper. To fix it you can check out the atom_feed_helper version inside the Ruby on Rails repository and after that, copy and paste it to /vendor/plugins/ directory.&lt;br /&gt;The repository is: &lt;a href="http://svn.rubyonrails.org/rails/plugins/atom_feed_helper"&gt;http://svn.rubyonrails.org/rails/plugins/atom_feed_helper&lt;/a&gt;.&lt;br /&gt;In there you will find plugins that are more up to date.&lt;br /&gt;In the README you will find a simple example to build your feed. Like when you click in our Cnxs feed at the navigation bar, if you are browsing with Firefox.&lt;br /&gt;Here comes our example:
&lt;pre&gt;&lt;span class="comment"&gt;# rss.builder&lt;/span&gt;
&lt;span class="ident"&gt;atom_feed&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:schema_date&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@posts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;last&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;created_at&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;year&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;feed&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;feed&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;title&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;CNXS&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
  &lt;span class="ident"&gt;feed&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;updated&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@posts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="attribute"&gt;@posts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;created_at&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="constant"&gt;Time&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;now&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;utc&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="attribute"&gt;@posts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
    &lt;span class="ident"&gt;feed&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;entry&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;entry&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
      &lt;span class="ident"&gt;entry&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;title&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;title&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
      &lt;span class="ident"&gt;entry&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;content&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;body&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:type&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;html&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
      &lt;span class="ident"&gt;entry&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;author&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;author&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
        &lt;span class="ident"&gt;author&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;user&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
        &lt;span class="ident"&gt;author&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;email&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;user&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;email&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;


You can note the the atom_feed method has 4 arguments, but just one of them is required, that is the :schema_date. You can read at &lt;a href="http://feedvalidator.org/docs/error/InvalidTAG.html"&gt;http://feedvalidator.org/docs/error/InvalidTAG.html&lt;/a&gt;, you see that the URI tag needs a year to be fix in the validators, month and day parts are optional. The others arguments are :language, that defaults to &amp;quot;en-US&amp;quot;, :root_url, that defaults to the root path on the current host and :url that defaults to the current URL.&lt;br /&gt;Another thing that you can look is that the &amp;quot;.builder&amp;quot; extension has higher precedence. So, if you code it in your rss action in the PostsController:

&lt;pre&gt;&lt;span class="ident"&gt;respond_to&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;atom&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="ident"&gt;render&lt;/span&gt; &lt;span class="symbol"&gt;:layout&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;/pre&gt;

the atom format respond int the same way to rss.builder and rss.atom.builder.&lt;br /&gt;

See you.</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/17</id>
    <published>2008-01-18T09:33:27Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/some-thoughts-on-some-thoughts-on-security" />
    <title>Some Thoughts on Some Thoughts on Security</title>
    <content type="html">I've been reading a great &lt;a href="http://cr.yp.to/qmail/qmailsec-20071101.pdf"&gt;paper&lt;/a&gt; by Daniel J. Bernstein, the creator of a &lt;a href="http://cr.yp.to/qmail.html"&gt;qmail&lt;/a&gt;, and wow, what a pearl of wisdom. One of the most clarifying and straight to the point works on code security I have ever read. He (quite correctly) makes a parallel between the code security and the amount on exploitable bugs (EB), stating that it is the major problem on the code, regarding security. And then gives some answers to that problem, along with a couple of common distractions of the programmer while coding that helps those EB creep on our code base (CB). Let's review then, starting with the distractions, and I'll try to make some links with my favorite unambiguous tool of choice, Ruby. &lt;ol&gt; &lt;li&gt;Chasing attackers. The point here is give some thought to respond to tomorrow's attacks, and not being trapped by the anti-virus mentality of being only responsive to aggressors. Perhaps the dynamic nature of Ruby would help with that, but I think it is more a personal posture problem than anything else.&lt;/li&gt; &lt;li&gt;Minimizing privilege. Here, what is being said is that the old principle of least privilege is fundamentally wrong. How so? Well, it might (!) reduce the damage done by security holes, but never fixes these. Plus, IMO, it might even give users a false sense of security. Again, it is more of a way of a personal way of thinking (but what isn't? :P ).&lt;/li&gt; &lt;li&gt;Speed, speed, speed. Here I think rubists have some advantage. Since we work on a language that is 'slow', usually we tend to not place emphasis on premature optimization. I think this quote summarizes the thinking here: &lt;blockquote&gt;Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efﬁciencies, say about 97% of the time; premature optimization is the root of all evil. &amp;mdash;Knuth in [13, page 268]&lt;/blockquote&gt;&lt;/li&gt; &lt;/ol&gt; Now, to the answers. These are also 3, and they are codependent connected to each other: &lt;ol&gt; &lt;li&gt;Eliminating bugs. I think everyone saw that one coming. But even so, Daniel's down to earth advices on it are a very worthwhile reading. I think I can summarize him on this section by saying (and that is a plus to rubists too), simplify stuff. Simplify interfaces, UI, parsing. Elegance is not a luxury, it is a way to obtain security. Following that logic we come to.&lt;/li&gt; &lt;li&gt;Eliminating code. Heck, here I'll quote his quote, and be done with it. &lt;blockquote&gt;To this very day, idiot software managers measure 'programmer productivity' in terms of 'lines of code produced,' whereas the notion of 'lines of code spent' is much more appropriate. &amp;mdash;Dijkstra in [9, page EWD962&amp;ndash;4]&lt;/blockquote&gt; But as our systems grow, and our time and budgets remain the same or are diminished, and as programmers get more dumb, something has to give right? Wrong (don't know about the last part though).&lt;/li&gt; &lt;li&gt;Eliminating trusted code. That is somewhat more difficult I think, but it says that a program should do what it is meant to do, nothing more, and trust as few sources of data as possible. KISS and all that stuff.&lt;/li&gt; &lt;/ol&gt; I would love to hear any input on that. Until next time people.</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/16</id>
    <published>2008-01-16T20:07:26Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/oracle-acquired-bea" />
    <title>Oracle Acquired BEA</title>
    <content type="html">What a day &lt;a href="http://www.oracle.com/bea/"&gt;huh&lt;/a&gt;? &lt;a href="http://www.oracle.com"&gt;Oracle&lt;/a&gt; bought BEA for around U$ 8.5 billions. I don't like this kind of acquisition, cause means less competitors in some market that they used to compete.</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/15</id>
    <published>2008-01-16T18:52:28Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/mysql-acquired-by-sun" />
    <title>MySQL Acquired by SUN</title>
    <content type="html">&lt;a href="http://www.mysql.com/" target="_blank"&gt;Huh&lt;/a&gt;? Sun acquired MySQL as announced today. I was very surprised by this notice, I guess soon we gonna have a much better DBMS. How does it sound for you?</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/14</id>
    <published>2008-01-14T23:29:16Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/work-environment" />
    <title>Work Environment</title>
    <content type="html">What's your work environment? Which IDE or whatever you use for code? I will describe mine:&lt;br /&gt;I use &lt;a href="http://www.eclipse.org" title="Eclipse" target="_blank"&gt;Eclipse&lt;/a&gt; as my IDE for Rails Java or ColdFusion (I use a separate version/dist of Eclipse for each). I don't have too much to complain about memory usage, cause everytime I prefer spend a hundred bucks more on my pc's to get much more memory that I would use. By the way here's a tip for those who want to reduce the memory usage of Eclipse, or just want to not have some tools that they will not use (that's me!). Download only the Eclipse Plataform Binary (around 40MB) that comes without the JDT and without other unnecessary plugins.&lt;br /&gt;Ok that will save some MB on your memory. Now build your own environment, with only plugins that you want!&lt;br /&gt;Here is mine for Ruby on Rails: &lt;a href="http://www.aptana.com" title="Aptana" target="_blank"&gt;Aptana&lt;/a&gt;, &lt;a href="http://www.aptana.com" title="RadRails" target="_blank"&gt;RadRails&lt;/a&gt;, &lt;a href="http://subclipse.tigris.org" title="SubClipse" target="_blank"&gt;Subclipse&lt;/a&gt;.&lt;br /&gt;ColdFusion: &lt;a href="http://www.cfeclipse.org" title="CFEclipse" target="_blank"&gt;CFEclipse&lt;/a&gt;, &lt;a href="http://www.aptana.com" title="Aptana" target="_blank"&gt;Aptana&lt;/a&gt;, &lt;a href="http://subclipse.tigris.org" title="SubClipse" target="_blank"&gt;Subclipse&lt;/a&gt;&lt;br /&gt;Java: WTP, &lt;a href="http://subclipse.tigris.org" title="SubClipse" target="_blank"&gt;Subclipse&lt;/a&gt;.</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/13</id>
    <published>2008-01-14T21:35:07Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/ext-js" />
    <title>Ext JS</title>
    <content type="html">Hey people, here is my first post and I expect you enjoy it.&lt;br /&gt;Have you ever heard about the javascript library &lt;a href="http://www.extjs.com" title="Ext JS" target="_blank"&gt;Ext JS&lt;/a&gt;? If your answer is no, you should visit their website. It's an amazing javascript library, build in the top of &lt;a href="http://developer.yahoo.com/yui/" title="Yahoo UI" target="_blank"&gt;Yahoo UI&lt;/a&gt; library (another amazing), with a impressive variety of pretty beautiful and fully featured components. It's also extensible, customizable and very well documented. This last point I want to give a special focus, cause the documentation of the api is very good (part are inherit of YUI).&lt;br /&gt;So if you want to deliver web 2.0 applications, don't forget to take a look closely on this library.</content>
    <author>
      <name>Rafael Coelho de Souza</name>
      <email>rcoelhodesouza@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/12</id>
    <published>2008-01-14T13:08:17Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/html-filtering-with-sanitize-helper" />
    <title>HTML Filtering with sanitize helper</title>
    <content type="html">Hi sirs,&lt;br /&gt; another important feature that we need to use is the 'sanitize' helper. This Ruby on Rails helper filters HTML nodes and attributes and strips invalid protocols. Here in our case the use it on the simpler way:&lt;br /&gt; &lt;code&gt;&amp;lt;%= sanitize(post.body) %&amp;gt;&lt;/code&gt;&lt;br /&gt; Other time you can choose the options ':tags' and ':attributes' to do a custom use where just the HTML tags and attributes pointed here are allowed to be interpreted.&lt;br /&gt; It is another little tip that helps in malicious posts or comments containing javascripts codes or comments with different enconding. Here comes the Rails API link to more information about this: &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#M000936" title="Sanitize Helper" target="_blank"&gt;SanitizeHelper&lt;/a&gt;.&lt;br /&gt; See you.</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/11</id>
    <published>2007-12-27T22:09:33Z</published>
    <updated>2008-11-13T20:15:35Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/ruby-on-rails-pagination" />
    <title>Ruby on Rails pagination</title>
    <content type="html">&lt;p&gt;Hi sirs.&lt;/p&gt; &lt;p&gt;I really recommend the official Ruby on Rails paginator. Very easy to use. Like 95% of the plugins =).&lt;/p&gt; &lt;p&gt;I just checkout the project on SVN, change one line of code on my controller, appends a line of code on the &amp;quot;.html.erb&amp;quot; template index file, and paste a piece of CSS code on the stylesheet, and it works. The piece of CSS code is defined on the README file inside the plugin's root directory.&lt;/p&gt; &lt;p&gt;In my case, I just insert on my controller:&lt;/p&gt; 
&lt;pre&gt;&lt;span class="attribute"&gt;@posts&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;paginate&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:page&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:page&lt;/span&gt;&lt;span class="punct"&gt;],&lt;/span&gt; &lt;span class="symbol"&gt;:per_page&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;10&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:order&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;created_at DESC&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;and just insert on the view's bottom:&lt;/p&gt; 
&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; will_paginate @posts %&amp;gt;&lt;span class="normal"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The CSS code I just change the color =).&lt;/p&gt; &lt;p&gt;The SVN repository is &lt;a href="svn://errtheblog.com/svn/plugins/will_paginate"&gt;svn://errtheblog.com/svn/plugins/will_paginate&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The page that contains most of instructions is the &lt;a href="http://errtheblog.com/"&gt;err.the_blog&lt;/a&gt;, but if you just read the README in the will_paginate plugin you will be prepared to do all the work.&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/10</id>
    <published>2007-12-27T08:17:28Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/new-file-extensions-on-ruby-on-rails" />
    <title>New file extensions on Ruby on Rails</title>
    <content type="html">The very best point to participate of a developers group like CNXS is when you found a problem, everyone tries to help faster they can.&lt;br /&gt;Rafael Souza shows me &lt;a href="http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-rhtml-and-rxml-to-die-a-slow-and-painful-death"&gt;this post&lt;/a&gt; on another blog and it helps a lot. Just change the extension &amp;quot;.rhtml&amp;quot; to &amp;quot;.html.erb&amp;quot; and &amp;quot;.rxml&amp;quot; to &amp;quot;.builder&amp;quot; on you Ruby on Rails application in version 2.0.2. Your problems is gone.&lt;br /&gt;See you.</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/9</id>
    <published>2007-12-27T07:37:51Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/problems-on-ruby-on-rails-2-0-2" />
    <title>Problems on Ruby on Rails 2.0.2</title>
    <content type="html">Hi all,&lt;br /&gt; Ruby on Rails 2.0.2 is released... and I do not like this version, because of 2 modifications.&lt;br /&gt; 1. Database default: Postgresql is my favorite database management system, but I know that Mysql is very easy to use on Windows and Linux. I respect the preference about Mysql. But I do not like what I read on &amp;quot;&lt;a href="http://weblog.rubyonrails.org/2007/12/17/rails-2-0-2-some-new-defaults-and-a-few-fixes"&gt;Riding Rails&lt;/a&gt;&amp;quot; that says &amp;quot;This is especially so under OS X 10.5 Leopard, which ships with SQLite3 and the driver gems preinstalled as part of the development kit&amp;quot;. Sincerelly, for me, it is not a good point to change the default database :P&lt;br /&gt; 2. &amp;quot;.rxml&amp;quot; files was fired. Our feed on the site just blow up... because we use the .rxml files to render the xml version of the site.&lt;br /&gt;&lt;br /&gt; Our host is using just Rails 2.0.2, living on the edge has problems too.&lt;br /&gt; =)&lt;br /&gt; See you.</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/8</id>
    <published>2007-12-19T14:52:22Z</published>
    <updated>2008-10-25T02:28:39Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/cv-with-curve-and-latex-in-ubuntu-7-10" />
    <title>CV with Curve and LaTeX in Ubuntu 7.10</title>
    <content type="html">&lt;p&gt;Hey there. In our little how-to I'll explain something that was very useful to me, this great &lt;a href="http://www.lrde.epita.fr/~didier/research/verna.06.practex.pdf"&gt;tutorial&lt;/a&gt; by &lt;a href="http://www.lrde.epita.fr/~didier/"&gt;Didier Verna&lt;/a&gt;, on using the &lt;a href="http://en.wikipedia.org/wiki/LaTeX"&gt;Latex&lt;/a&gt; &lt;a href="http://www.ctan.org/tex-archive/macros/latex/contrib/curve/"&gt;curve&lt;/a&gt; class to build Cvs (pretty nice and standardized ones). That will be a superb reading for a more detailed tutorial. If you want to take a peek before reading on, here is my &lt;a href="../../files/cv.pdf"&gt;CV&lt;/a&gt; sample(a little past upgrade time :P), using a modified version of the sample used on the aforementioned tutorial, plus the source files &lt;a href="../../files/cv_source.tar.gz"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Anyway, I'll use the Ubuntu 7.10 distro, and all the wonderful free tool that are at our disposal in there. First, lets download the, IMO, best latex docs editor, &lt;a href="http://kile.sourceforge.net/"&gt;kile&lt;/a&gt;. Then let's proceed to fetch the LaTeX packages so our Kile can compile smoothly our docs.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install kile tetex-extra&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Now bake a cake and go play soccer (looong download). Then download the &lt;a href="http://www.ctan.org/tex-archive/macros/latex/contrib/curve/"&gt;Curve&lt;/a&gt; (or take the compiled one with my source files) class and place it on the docs root tree. So, now build a new project, add all the necessary files on that, including the curve class. If click on the pdflatex button (the big gear with a little pdf symbol) it should generate the cv.pdf nicely (don't forget to only use PDF, JPG, JBIG2, and PNG graphics formats, kile use pdflatex on this command, do yourself a favor and read the manual).&lt;/p&gt; &lt;p&gt;On some future post I'll go step by step on my modifications and the meanings of the commands. But if you just change the text and go hacking stuff you'll eventually find out what things mean. Oh, and please write on open office or something else that has a grammar correction, a CV with grammar mistakes don't look so good :)&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/7</id>
    <published>2007-12-18T18:26:23Z</published>
    <updated>2008-04-18T10:03:20Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/first-page-on-google-com-br" />
    <title>First page on google.com.br</title>
    <content type="html">Hi all,&lt;br /&gt;I am very happy to type 'cnxs' on &lt;a href="http://google.com.br"&gt;google.com.br&lt;/a&gt;, and found our name in the first page.&lt;br /&gt;Thanks to meta tags =)&lt;br /&gt;See you.</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/6</id>
    <published>2007-12-16T21:19:54Z</published>
    <updated>2008-10-25T02:24:15Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/installing-postgresql-on-ubuntu-7-10" />
    <title>Installing Postgresql on Ubuntu 7.10</title>
    <content type="html">&lt;p&gt;Hi Sirs.&lt;/p&gt; &lt;p&gt;Now I am using &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu 7.10&lt;/a&gt; and my favorite Database Management System is &lt;a href="http://www.postgresql.org/"&gt;Postgresql&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The best tutorial that I found is the Ubuntu tutorial about Postgresql and &lt;a href="http://www.pgadmin.org/"&gt;pgAdmin&lt;/a&gt; installation.&lt;/p&gt; &lt;p&gt;Very easy to learn by every developer. This tutorial shows how to install both the Database Management System and the Administration and Development Platform.&lt;/p&gt; &lt;p&gt;&lt;a href="https://help.ubuntu.com/community/PostgreSQL"&gt;https://help.ubuntu.com/community/PostgreSQL&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Easy to install and configure.&lt;/p&gt; &lt;p&gt;Just one line to install the 'Sophisticated open-source Object-Relational DBMS' and the 'graphical Open Source management, development and administration tool'.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo apt-get install postgresql pgadmin3&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Other two commands to configure your new account:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ sudo -u postgres psql template1&lt;br /&gt;$ template1=# ALTER USER postgres WITH ENCRYPTED PASSWORD '&amp;lt;***password***&amp;gt;';&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;I recommend this tutorial =]&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/5</id>
    <published>2007-12-13T21:44:39Z</published>
    <updated>2008-10-21T03:12:12Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/filter-sensitive-information-on-logs" />
    <title>Filter sensitive information on logs</title>
    <content type="html">&lt;p&gt;Hi Sirs,&lt;/p&gt; &lt;p&gt;a very important thing that I can remember about security on web environment is 'logs'.&lt;/p&gt; &lt;p&gt;&lt;a href="http://rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; provide a very simple way to protect us of store sensitive information on the logs. Every information that goes through the parameters is writed on the log. In websystem development phasis logging information is important, but in the production phasis, is dangerous. Hackers in general can take information through many ways. Our tip to protect sensitive information in the logs is the method 'filter_parameter_logging' of the &lt;a href="http://api.rubyonrails.com/classes/ActionController/Base.html"&gt;Class ActionController::Base&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;ActionController is the mother class of every controller in your applications, so the best place to call it is in the &lt;em&gt;app/controllers/application.rb&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;Just insert this example line of code:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;filter_parameter_logging :password, :password_confirmation&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;and than it replaces the values of all keys that matches the arguments name with &amp;quot;[FILTERED]&amp;quot;, and you are protecting your informations in the logs.&lt;/p&gt; &lt;p&gt;Is a simple tip, but very important. Do not forgot to use it.&lt;/p&gt; &lt;p&gt;See you.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/4</id>
    <published>2007-12-10T00:12:04Z</published>
    <updated>2008-10-21T03:09:00Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/rails-2" />
    <title>Rails 2</title>
    <content type="html">&lt;p&gt;Hi all,&lt;/p&gt; &lt;p&gt;I am very happy to give you the notice that our website here, is installed in Ruby on Rails 2.0.1 just 3 days after the release is finished. Installed and tested in the weekend =].&lt;/p&gt; &lt;p&gt;That's the way that the CNXS team likes to work. Ever living on the edge.&lt;/p&gt; &lt;p&gt;Congratulations to Ruby on Rails Development Staff and to CNXS Team.&lt;/p&gt; &lt;p&gt;See you sirs.&lt;/p&gt;</content>
    <author>
      <name>Wilson de Almeida</name>
      <email>wilsondealmeida@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/3</id>
    <published>2007-12-10T00:05:34Z</published>
    <updated>2008-10-21T03:07:40Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/a-good-testing-idea" />
    <title>A good testing idea</title>
    <content type="html">&lt;p&gt;The &lt;a href="http://www.youtube.com/watch?v=m-nwvB7Up_g"&gt;approach&lt;/a&gt; of Douglas Sellers about testing their AJAX heavy system really sounded to me as an excellent idea. I can imagine in the future this being adopted by more and more web systems, as they embrace javascript for building RIAs more and more.&lt;/p&gt; &lt;p&gt;Essentially they have built a DSL on top of &lt;a href="http://www.openqa.org/selenium/"&gt;selenium&lt;/a&gt; using ruby (yay), for testing the AJAX stuff on their page, aiming at easiness to write the tests, trading the complexity of writing the tests for the complexity of the DSL itself, trying even for the non technical people on the company to write their own tests.&lt;/p&gt; &lt;p&gt;Really recommended for a fresh and no nonsense view on testing.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/2</id>
    <published>2007-12-10T00:04:34Z</published>
    <updated>2008-10-20T21:06:18Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/freedom-of-our-thoughts-and-works" />
    <title>Freedom of our thoughts and works</title>
    <content type="html">&lt;p&gt;If you have not yet &lt;a href="http://www.ted.com/talks/view/id/187"&gt;seen&lt;/a&gt; or &lt;a href="http://www.free-culture.cc/"&gt;read&lt;/a&gt; Lawrence Lessig, I urge you to. I'll try to make a small analysis on his work, just as a appetizer for for those still ignorant about it :).&lt;/p&gt; &lt;p&gt;His point is that we are moving away from a read-only culture, where the content is controlled and governed by producers and broadcasters, and consumers have little saying on the content, to a read-write culture.&lt;/p&gt; &lt;p&gt;What is a read-write culture? One that is governed by the freedom to modify. Where distribution costs are next to zero, and each individual now has a shot at producing her own content, and to mix and remix work of a third party, without being worry of a lawsuit. A new (we could argue that for most of the human history it has been that way, just in the 20 century the paradigm has changed) way of looking at our own freedoms, and how we can not only consume work of others, but create ours, based or not on all the free content available.&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
  <entry>
    <id>tag:cnxs.com.br,2007:Post/1</id>
    <published>2007-12-10T00:03:34Z</published>
    <updated>2008-10-20T21:04:22Z</updated>
    <link rel="alternate" type="text/html" href="http://cnxs.com.br/posts/introduction-to-cnxs" />
    <title>Introduction to cnxs</title>
    <content type="html">&lt;p&gt;Hey Folks. This is the first post, so I'll manage to keep myself away from technological ramblings and just say some words about us and our purpose here.&lt;/p&gt; &lt;p&gt;This is not exactly a company, it is more a group of friends with some mutual interests who got together because they thought it would be fun to do it and each could learn and teach the others a lot.&lt;/p&gt; &lt;p&gt;What bought us together here is a passion for developing good software, with tools that help us not only accomplish this, but to have some fun while we are doing it. We like what we do, and I can say that we don't view this as a job, but as a pleasant thing, which fortunately happens to be payed sometimes (yay). I think that's that for now, but we'll be back tomorrow.&lt;/p&gt; &lt;p&gt;Hugs everyone, and welcome to the joy of connected thoughts :D&lt;/p&gt;</content>
    <author>
      <name>Eduardo Bellani</name>
      <email>ebellani@gmail.com</email>
    </author>
  </entry>
</feed>
