class Entity < ApplicationRecord sample_filter( { title: {type: :string}, amount: {type: :number}, 'created_at' => {'type' => 'date', default_value: {from: '09.10.2016', to: '17.12.2023'}}, kind: { type: 'list', values: {red: 1, 'green' => '2'}, default_value: 2 }, status: { type: :list, values: [:active, 'inactive'], default_value: :inactive }, confirmed: {type: :boolean, default_value: true}, sort: { type: :sorting, values: [:id, 'created_at', :amount], default_value: 'amount_desc' } } ) end