Created
January 8, 2015 20:05
-
-
Save Fivell/56215c4da008c49585eb to your computer and use it in GitHub Desktop.
monkey patch setting :equals as default for string filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveAdmin | |
| module Inputs | |
| module Filters | |
| module StringInputExt | |
| def self.included(base) | |
| base.class_eval do | |
| @filters = [:equals, :contains, :starts_with, :ends_with] | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end | |
| ActiveAdmin::Inputs::Filters::StringInput.send(:include, ActiveAdmin::Inputs::Filters::StringInputExt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment