lib/active_record/where_chain_extensions_rails4.rb
# Prepare the WHERE clause by inserting a proper Arel node and inverting
# it if necessary.
#
# Note: This is the Active Record 4 version.
Prepare the WHERE clause by inserting a proper Arel node and inverting
it if necessary.

This is the Active Record 4 version.
Prepare the WHERE clause by inserting a proper Arel node and inverting it if necessary . This is the Active Record 4 version .
def prepare_where(node_type, infix, opts, *rest)
        where_value = @scope.send(:build_where, opts, rest).map do |rel|
          if @invert
            Arel::Nodes::Not.new arel_node(node_type, infix, rel)
          else
            arel_node(node_type, infix, rel)
          end
        end
        @scope.where_values += where_value
        @scope
      end
def prepare_where ( node_type , infix , opts , * rest ) where_value = @scope . send ( :build_where , opts , rest ) . map do | rel | if @invert Arel :: Nodes :: Not . new arel_node ( node_type , infix , rel ) else arel_node ( node_type , infix , rel ) end end @scope . where_values += where_value @scope end
Prepare the WHERE clause by inserting a proper Arel node and inverting
it if necessary.
Prepare the WHERE clause by inserting a proper Arel node and inverting it if necessary .
node_type
infix
opts
rest