class Ransack::Configuration::PredicateCollection

Attributes

sorted_names_with_underscores[R]

Public Class Methods

new() click to toggle source
# File lib/ransack/configuration.rb, line 12
def initialize
  @collection = {}
  @sorted_names_with_underscores = []
end

Public Instance Methods

[]=(key, value) click to toggle source
# File lib/ransack/configuration.rb, line 19
def []=(key, value)
  @sorted_names_with_underscores << [key, '_' + key]
  @sorted_names_with_underscores.sort! { |(a, _), (b, _)| b.length <=> a.length }

  @collection[key] = value
end