"Ernie Miller" <[email protected]> wrote in message news:[email protected]...
Hi all. I was hoping to get some feedback on a patch to rails/arel I've put >together. Not really sure where else to get some eyes on this, since >Lighthouse doesn't seem appropriate given the separation of rails/arel from >rails/rails.

arel.lighthouseapp.com would be appropriate, but since that appears to be extremely low volume, for additional feedback posting here makes sense.

http://gist.github.com/360075

This patch adds support for some new types of predicates and cleans up a few >small things. Tests are included.

It adds a unary predicate, Not. Predicate#not will negate the predicate on >which it's called.

For example, users[:name].eq('Bob').or(users[:name].eq('Joe')).not will >match users not named Joe or Bob.

That breaks left to right readability pretty badly. I really would like a better solution for negating predicates and predicate chains, but I'm not sure what.

You probably should also have the README file patched to indicate that AND and OR are implemented

Also, I'm not sure how of :notmatches_any and :notmatches_all will react. Will the negation be applied before or after the combining?

Also if you have a _any and _all prefix, should you not also include a _none, too?

Also is ".not" in use out in the wild already? How will existing code react? Will it error out indicating that the new .not toes not take parameters?




--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to