module Stall::Ransack

Public Class Methods

configure() click to toggle source
# File lib/ext/ransack.rb, line 3
def self.configure
  ::Ransack.configure do |config|
    config.add_predicate 'between_cents',
      arel_predicate: 'between',
      formatter: proc { |v| Range.new(*v.split(',').map { |s| (s.to_i * 100) }) },
      validator: proc { |v| v.present? },
      type: :string
  end
end