Sha256: b666599d77762b0aae043fc586100d436f1994d11a1ad5ad72739dbeb268a605

Contents?: true

Size: 387 Bytes

Versions: 2

Compression:

Stored size: 387 Bytes

Contents

module Mongoid
  module Scroll
    module Errors
      class MultipleSortFieldsError < Mongoid::Scroll::Errors::Base

        def initialize(opts = {})
          if opts[:sort] && opts[:sort].is_a?(Hash)
            opts = opts.merge(sort: opts[:sort].keys.join(", "))
          end
          super(compose_message("multiple_sort_fields", opts))
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoid-scroll-0.2.1 lib/mongoid/scroll/errors/multiple_sort_fields_error.rb
mongoid-scroll-0.2.0 lib/mongoid/scroll/errors/multiple_sort_fields_error.rb