Sha256: a902147da906c57f3009ca4ce1dc06b5c6ef73bf3d5c874002f7bbfcace3fec2

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

module Trailblazer
  class Finder
    module Adapters
      module ActiveRecord
        # ActiveRecord - Sorting Adapter
        module Sorting
          def self.included(base)
            base.extend Features::Sorting::ClassMethods
          end

          private

          def sort_it(entity_type, sort_attribute, sort_direction)
            entity_type.order sort_attribute.to_s => sort_direction
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trailblazer-finder-0.1.2 lib/trailblazer/finder/adapters/active_record/sorting.rb
trailblazer-finder-0.1.1 lib/trailblazer/finder/adapters/active_record/sorting.rb
trailblazer-finder-0.1.0 lib/trailblazer/finder/adapters/active_record/sorting.rb