Module: QueryFilter

Defined in:
lib/query_filter/base.rb,
lib/query_filter.rb,
lib/query_filter/version.rb,
lib/query_filter/rules/range.rb,
lib/query_filter/rules/scope.rb,
lib/query_filter/rules/order_by.rb,
lib/query_filter/rules/date_range.rb,
lib/query_filter/utils/date_period.rb,
lib/query_filter/utils/scope_range.rb,
lib/query_filter/rules/splitter_range.rb,
lib/query_filter/utils/date_normalizer.rb,
lib/query_filter/utils/user_conditions.rb

Overview

Parse date range params

date_range :created_at, keys: [:start_date, :end_date]

date_range :last_login_date

Defined Under Namespace

Modules: Rules, Utils Classes: Base

Constant Summary collapse

VERSION =
'0.2.3'

Class Method Summary collapse

Class Method Details

.setup {|_self| ... } ⇒ Object

Default way to setup QueryFilter

Examples:

QueryFilter.setup do |config|
  config.date_period_format = '%d-%m-%Y'
  config.date_period_splitter = 'until'
end

Yields:

  • (_self)

Yield Parameters:

  • _self (QueryFilter)

    the object that the method was called on



53
54
55
# File 'lib/query_filter.rb', line 53

def self.setup
  yield self
end