+1 for reverting this ASAP.
The reason was already very clearly explained in the 4th post of this thread.
I believe, this is the most important point.
And to do it at all breaks the relational algebra idea badly.
Now, let me show you my real world tragedy.
# model
class User
scope :admin, where(:id => [1, 2, 3, 4])
end
# controller
def admin?
User.admin.where(:id => session[:user_id]).exists?
end
Imagine what happened to my app!
As for the "OR" API, I think squirrel had the best syntax against ambiguity.
Book.written_by('david').published #=> AND
Book.or {
written_by('david')
published
} #=> OR
+1 for reverting this ASAP.
The reason was already very clearly explained in the 4th post of this
thread.
I believe, this is the most important point.
And to do it at all breaks the relational algebra idea badly.
Now, let me show you my real world tragedy.
# model
class User
scope :admin, where(:id => [1, 2, 3, 4])
end
# controller
def admin?
User.admin.where(:id => session[:user_id]).exists?
end
Imagine what happened to my app!
As for the "OR" API, I think squirrel had the best syntax against
ambiguity.
Book.written_by('david').published #=> AND
Book.or {
written_by('david')
published
} #=> OR
It's fixed in 3.0.5.rc1 and in master.