[Rails] [ANN] Where Plugin

Jens-Christian Fischer jcf at invisible.ch
Sun Jan 1 22:56:11 GMT 2006


> When I was originally playing with this I came up with this little  
> class : http://rubyurl.com/DxL
>
> With that one you can build the conditions with a lightly nicer  
> syntax:
>
> c = Cond.new do
>   month '<=', 11
>   year '=', 2005
>   name 'LIKE', 'ruby%'
> end

Ahh - I didn't realize you already had that class fleshed out. I'm  
fairly new to methods taking blocks, so I didn't know how to use your  
syntax (which I like) with the

Model.find_with_conditions ....

method. The "method_missing" won't work, because it would override  
ActiveRecords method_missing, right?

How to integrate those two concepts?

jc

--
InVisible GmbH, Langgrütstrasse 172, 8047 Zürich
Phone: +41 44 401 09 30
http://www.invisible.ch   http://not.invisible.ch

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2361 bytes
Desc: not available
Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060101/9b8b18cc/smime.bin


More information about the Rails mailing list