Sha256: c5a3f7ed0498835d93972ab78951282d072f5faff9ec058b751c2bf47cc13e8b

Contents?: true

Size: 304 Bytes

Versions: 176

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

module Motor
  module ApiQuery
    module BuildMeta
      module_function

      def call(rel, params)
        meta = {}

        meta[:count] = rel.limit(nil).offset(nil).reorder(nil).count if params[:meta].to_s.include?('count')

        meta
      end
    end
  end
end

Version data entries

176 entries across 176 versions & 1 rubygems

Version Path
motor-admin-0.3.4 lib/motor/api_query/build_meta.rb
motor-admin-0.3.3 lib/motor/api_query/build_meta.rb
motor-admin-0.3.2 lib/motor/api_query/build_meta.rb
motor-admin-0.3.1 lib/motor/api_query/build_meta.rb
motor-admin-0.3.0 lib/motor/api_query/build_meta.rb
motor-admin-0.2.89 lib/motor/api_query/build_meta.rb
motor-admin-0.2.88 lib/motor/api_query/build_meta.rb
motor-admin-0.2.87 lib/motor/api_query/build_meta.rb
motor-admin-0.2.86 lib/motor/api_query/build_meta.rb
motor-admin-0.2.85 lib/motor/api_query/build_meta.rb
motor-admin-0.2.84 lib/motor/api_query/build_meta.rb
motor-admin-0.2.83 lib/motor/api_query/build_meta.rb
motor-admin-0.2.82 lib/motor/api_query/build_meta.rb
motor-admin-0.2.81 lib/motor/api_query/build_meta.rb
motor-admin-0.2.80 lib/motor/api_query/build_meta.rb
motor-admin-0.2.79 lib/motor/api_query/build_meta.rb
motor-admin-0.2.78 lib/motor/api_query/build_meta.rb
motor-admin-0.2.77 lib/motor/api_query/build_meta.rb
motor-admin-0.2.76 lib/motor/api_query/build_meta.rb
motor-admin-0.2.75 lib/motor/api_query/build_meta.rb