Module: Motor::ApiQuery::BuildMeta

Defined in:
lib/motor/api_query/build_meta.rb

Class Method Summary collapse

Class Method Details

.call(rel, params) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/motor/api_query/build_meta.rb', line 8

def call(rel, params)
  meta = {}

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

  meta
end