module Ransack::Configuration
def sanitize_custom_scope_booleans=(boolean)
end
config.sanitize_custom_scope_booleans = false
# Accept my custom scope values as what they are.
Ransack.configure do |config|
`config/initializers/ransack.rb` as follows:
This default may be globally overridden in an initializer file like
[0, '0', 'f', 'F', 'false', 'FALSE'] all evaluate to false.
[1, '1', 't', 'T', 'true', 'TRUE'] all evaluate to true.
Ransack sanitizes many values in your custom scopes into booleans.
def sanitize_custom_scope_booleans=(boolean) self.options[:sanitize_scope_args] = boolean end