lib/active_record_extended/query_methods/unionize.rb
# TODO: Rails 5.0.x order logic will *always* append the parents name to the column when its an HASH obj
#       We should really do this stuff better. Maybe even just ignore `preprocess_order_args` altogether?
#       Maybe I'm just stupidly over paranoid on just the 'ORDER BY' for some odd reason.
Rails 5.0.x order logic will *always* append the parents name to the column when its an HASH obj
We should really do this stuff better. Maybe even just ignore `preprocess_order_args` altogether.
Maybe I'm just stupidly over paranoid on just the 'ORDER BY' for some odd reason.
Rails 5 . 0 . x order logic will * always * append the parents name to the column when its an HASH obj We should really do this stuff better . Maybe even just ignore ` preprocess_order_args ` altogether . Maybe I ' m just stupidly over paranoid on just the ' ORDER BY ' for some odd reason .
def process_ordering_arguments!(ordering_args)
            ordering_args.flatten!
            ordering_args.compact!
            ordering_args.map! do |arg|
              next to_arel_sql(arg) unless arg.is_a?(Hash) 
              arg.each_with_object([]) do |(field, dir), ordering_object|
                ordering_object << to_arel_sql(field).send(dir.to_s.downcase)
              end
            end.flatten!
          end
def process_ordering_arguments! ( ordering_args ) ordering_args . flatten! ordering_args . compact! ordering_args . map! do | arg | next to_arel_sql ( arg ) unless arg . is_a? ( Hash ) arg . each_with_object ( [ ] ) do | ( field , dir ) , ordering_object | ordering_object << to_arel_sql ( field ) . send ( dir . to_s . downcase ) end end . flatten! end
TODO: Rails 5.0.x order logic will *always* append the parents name to the column when its an HASH obj
We should really do this stuff better.
TODO : Rails 5 . 0 . x order logic will * always * append the parents name to the column when its an HASH obj We should really do this stuff better .
# ActiveRecord will reflect if an argument is a symbol
ordering_args