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.2.29 lib/motor/api_query/build_meta.rb
motor-admin-0.2.28 lib/motor/api_query/build_meta.rb
motor-admin-0.2.27 lib/motor/api_query/build_meta.rb
motor-admin-0.2.26 lib/motor/api_query/build_meta.rb
motor-admin-0.2.25 lib/motor/api_query/build_meta.rb
motor-admin-0.2.24 lib/motor/api_query/build_meta.rb
motor-admin-0.2.23 lib/motor/api_query/build_meta.rb
motor-admin-0.2.22 lib/motor/api_query/build_meta.rb
motor-admin-0.2.21 lib/motor/api_query/build_meta.rb
motor-admin-0.2.20 lib/motor/api_query/build_meta.rb
motor-admin-0.2.19 lib/motor/api_query/build_meta.rb
motor-admin-0.2.18 lib/motor/api_query/build_meta.rb
motor-admin-0.2.17 lib/motor/api_query/build_meta.rb
motor-admin-0.2.16 lib/motor/api_query/build_meta.rb
motor-admin-0.2.15 lib/motor/api_query/build_meta.rb
motor-admin-0.2.14 lib/motor/api_query/build_meta.rb
motor-admin-0.2.13 lib/motor/api_query/build_meta.rb
motor-admin-0.2.12 lib/motor/api_query/build_meta.rb
motor-admin-0.2.11 lib/motor/api_query/build_meta.rb
motor-admin-0.2.10 lib/motor/api_query/build_meta.rb