Class: Filterable::Railtie Private

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/filterable/railtie.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Rails integration for filterable. Loaded only when Rails::Railtie is defined (see the guarded require_relative in filterable).

The single initializer hooks ActiveSupport.on_load(:active_record) so the filtering engine and the datable/sortable concerns are mixed into ActiveRecord::Base once — every model then exposes filterable and the datable / sortable declaration DSL without an explicit include. A model that declares nothing keeps an empty whitelist, so filterable is a no-op that returns all.

Outside Rails the railtie is never loaded; include the concerns manually.