ruby-lang
March 8th, 2006, 09:25 PM
<p>Okay, well, <em><strong>KLAAABOOM</strong></em>, more <strong>Ruby</strong>. For spelling out queries. Lotsa operator mischief. As always, don’t take this too seriously, if you are prone to it. If you are not, then this calls for some bubbly.</p>
<pre>
articles = Article.ez_find(:all, :include => :author) do |article, author|
article.title =~ "%Foo Title%"
author.any do
name == 'Ezra'
name == 'Fab'
end
end
</pre>
<p>To install:</p>
<pre>
script/plugin install http://opensvn.csie.org/ezra/rails/plugins/dev/ez_where/
</pre>
<p>And, if you go deeper, there is <a href="http://brainspl.at/articles/2006/01/30/i-have-been-busy">a whole explanation</a>.</p>
<a href="http://redhanded.hobix.com/inspect/ezraSWherePluginIsOut.html" target="_blank">http://redhanded.hobix.com/inspect/ezraSWherePluginIsOut.html</a>
<pre>
articles = Article.ez_find(:all, :include => :author) do |article, author|
article.title =~ "%Foo Title%"
author.any do
name == 'Ezra'
name == 'Fab'
end
end
</pre>
<p>To install:</p>
<pre>
script/plugin install http://opensvn.csie.org/ezra/rails/plugins/dev/ez_where/
</pre>
<p>And, if you go deeper, there is <a href="http://brainspl.at/articles/2006/01/30/i-have-been-busy">a whole explanation</a>.</p>
<a href="http://redhanded.hobix.com/inspect/ezraSWherePluginIsOut.html" target="_blank">http://redhanded.hobix.com/inspect/ezraSWherePluginIsOut.html</a>