Sha256: 277214c253242bd47aa94b4bc4125f76b95cb7d329312723d5037c4282053487
Contents?: true
Size: 683 Bytes
Versions: 3
Compression:
Stored size: 683 Bytes
Contents
# UGLY, UGLY MONKEY PATCHES FOR BACKWARDS COMPAT!!! AVERT YOUR EYES!! if Arel::Nodes::And < Arel::Nodes::Binary class Ransack::Visitor def visit_Ransack_Nodes_And(object) nodes = object.values.map {|o| accept(o)}.compact return nil unless nodes.size > 0 if nodes.size > 1 nodes.inject(&:and) else nodes.first end end end end class ::ActiveRecord::Associations::ClassMethods::JoinDependency::JoinBase def table Arel::Table.new(table_name, :as => aliased_table_name, :engine => active_record.arel_engine, :columns => active_record.columns) end end
Version data entries
3 entries across 3 versions & 1 rubygems