Exception: Trek::Filters::NotAppliedError

Inherits:
StandardError
  • Object
show all
Defined in:
app/controllers/concerns/trek/filters.rb

Overview

Raised when a controller includes Trek::Filters but its #index never calls apply_filters! — to teach the developer to wire up filtering.

Constant Summary collapse

DEFAULT_MESSAGE =
<<~MSG.squish
  Trek::Filters is included but #index never called `apply_filters!`.
  Add `apply_filters!` to your index action (or `@objects = apply_filters(@objects, params[:filters])`).
  See https://trek.etamin.studio/reference/controllers#mixins
MSG

Instance Method Summary collapse

Constructor Details

#initialize(message = DEFAULT_MESSAGE) ⇒ NotAppliedError

Returns a new instance of NotAppliedError.



16
# File 'app/controllers/concerns/trek/filters.rb', line 16

def initialize(message = DEFAULT_MESSAGE) = super