Skip to content

Instantly share code, notes, and snippets.

@Fivell
Created January 8, 2015 20:05
Show Gist options
  • Select an option

  • Save Fivell/56215c4da008c49585eb to your computer and use it in GitHub Desktop.

Select an option

Save Fivell/56215c4da008c49585eb to your computer and use it in GitHub Desktop.
monkey patch setting :equals as default for string filters
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