class Ransack::Configuration::PredicateCollection
Attributes
Public Class Methods
Source
# File lib/ransack/configuration.rb, line 12 def initialize @collection = {} @sorted_names_with_underscores = [] end
Public Instance Methods
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