<div>On this note, I thought it would be good to raise having a &quot;lint like&quot; tool on the list;</div><div><br></div>I&#39;ve been asking in IRC if there is a &quot;lint like&quot; tool available, this would make it easier for smaller contributors to at least avoid the majority of issues, providing they run it through the &quot;lint like&quot; tool, which has been configured per coding standards.<div>
<br></div><div>This is all conjecture of course untill such time as the tool is made available, whatever it may be.</div><div><br></div><div>Case and point, whilst I am very interested in &quot;hacking&quot; and contributing code, I am not in any way shape or form a ruby developer I am a systems admin, who just happens to be able to write some ruby; and prefers python (pylint for example is a great tool).</div>
<div><br></div><div>Thoughts?</div><div><br></div><div>Cheers</div><div><br></div><div>David (Oneiroi)</div><div><br></div><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 2:39 PM, Matt Wagner <span dir="ltr">&lt;<a href="mailto:matt.wagner@redhat.com" target="_blank">matt.wagner@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Aug 17, 2012 at 10:52:46AM +0200, Jirka Tomasek wrote:<br>
&gt;<br>
&gt; I don&#39;t like the sentence &quot;Don&#39;t use it for passing variables to<br>
&gt; view. Never.&quot; which is actually one of the first things that any<br>
&gt; Rails book teaches you.<br>
<br>
</div>Yes, that was the main source of my confusion.<br>
<div class="im"><br>
&gt; I agree that we should try to reduce using<br>
&gt; instance variables in controllers where possible to avoid cluttering<br>
&gt; controllers with them.<br>
<br>
</div>As someone mentioned in another reply here, there are uses where you<br>
really need them -- e.g., before_filters. Of course we should be<br>
careful to not use instance variables where there&#39;s no need for them;<br>
sometimes we&#39;ll mistakenly use an instance variable just within the<br>
scope of a method, for example.<br>
<div class="im"><br>
&gt; The blog post you sent points out the reusability of partials so<br>
&gt; passing the variables as locals helps avoid requiring use of eg.<br>
&gt; @post in all partials instances. Imho it depends on the desired use<br>
&gt; of the partial.<br>
&gt;<br>
&gt; We have discussed with Imre the alternative way to pass variables<br>
&gt; from controller&#39;s action to view. It can be done similar way as with<br>
&gt; partials:<br>
&gt;<br>
&gt;   ...someactioncode...<br>
&gt;   render :action =&gt; :index, :locals =&gt; {:post =&gt; post}<br>
&gt; end<br>
&gt;<br>
&gt;<br>
</div><div class="im">&gt; but I have never seen this used anywhere in controller and I assume<br>
&gt; this is not the &quot;Rails way&quot;.<br>
<br>
</div>Yes, this feels pretty weird to me. That whole line should be<br>
unnecessary -- we&#39;re overriding the &quot;Rails magic&quot; to explicitly perform<br>
the default behavior, except referencing the variable as a local one. If<br>
anything, this seems _more_ error-prone to me than relying on instance<br>
variables.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Matt<br>
</font></span></blockquote></div><br>