Add "create_or" method #176

Open
wants to merge 1 commit into from

5 participants

@PlugIN73

By analogy with "create_and"

@ernie

I'm 👍 on the factory method but you don't need to create the Or node -- it already exists and is a binary type (left, right) -- see https://github.com/rails/arel/blob/master/lib/arel/nodes/binary.rb#L42

@ernie

Multiple children aren't supported for Or nodes, nor should they be. You'd want to update this PR to match the Or node's initializer signature:

def create_or left, right
  Nodes::Or.new left, right
end
@zzet

👍

@tamird

Looks good to merge.

@PlugIN73

@ernie , so can you merge it?

@seuros
Ruby on Rails member

Yes, seem good to merge. Squash your commits please.

@PlugIN73

@seuros done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment