The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Ezra's Where Plugin is Out

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Ezra's Where Plugin is Out Posted: Jan 31, 2006 10:17 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Ezra's Where Plugin is Out
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Okay, well, KLAAABOOM, more Ruby. 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.

 articles = Article.ez_find(:all, :include => :author) do |article, author|
   article.title =~ "%Foo Title%" 
   author.any do
     name == 'Ezra'
     name == 'Fab'
   end 
 end

To install:

 script/plugin install http://opensvn.csie.org/ezra/rails/plugins/dev/ez_where/

And, if you go deeper, there is a whole explanation.

Read: Ezra's Where Plugin is Out

Topic: Wait Until it Hurts Previous Topic   Next Topic Topic: join(

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use