ransack

https://github.com/activerecord-hackery/ransack

Ruby

Object-based searching.

Ransack::Configuration#sanitize_custom_scope_booleans=

Ransack sanitizes many values in your custom scopes into booleans.
[1, '1', 't', 'T', 'true', 'TRUE'] all evaluate to true.
[0, '0', 'f', 'F', 'false', 'FALSE'] all evaluate to false.

This default may be globally overridden in an initializer file like
`config/initializers/ransack.rb` as follows:

Ransack.configure do |config|
  # Accept my custom scope values as what they are.
  config.sanitize_custom_scope_booleans = false
end

Source | Google | Stack overflow

Edit

git clone [email protected]:activerecord-hackery/ransack.git

cd ransack

open lib/ransack/configuration.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Ransack--Configuration-sanitize_custom_scope_booleans--for-pr


# Commit to git

git add lib/ransack/configuration.rbgit commit -m "better docs for Ransack::Configuration#sanitize_custom_scope_booleans="


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Ransack--Configuration-sanitize_custom_scope_booleans--for-pr

hub pull-request


# Celebrate!