Filter :as => :string throws "undefined method `to_sym' for nil:NilClass" #60

Open
ptolts opened this Issue Oct 1, 2013 · 5 comments

5 participants

@ptolts

filter :name, :as => :string, :input_html => { :value => "" }

Error thrown in:

/activeadmin-mongoid-27ce04f84655/lib/meta_search/searches/mongoid.rb:19:in `block in build'

Parameters passed:

{"utf8"=>"✓",
 "q"=>{"name_contains"=>"Carambola"},
 "commit"=>"Filter",
 "order"=>"[:_id]_desc"}

Any help would be appreciated!

I tried forking and using ActiveAdmin 6.1, but no luck.

@AnalogJ

Has this been fixed? I just got the same thing.
It seems to happen when I add a filter :name for any of my models.
There also seems to be a visual glitch present:
capture
The selectbox is not working.

@elia
Owner

I don't think so, filter support is in a kind of draft state, I should probably mention that in the readme…

Official support for mongoid has started in AA, I think this project will be a bit on hold in order to concentrate eventual efforts on AA itself

@minktom

This patch fixed it for me:

module ActiveAdmin
  module Inputs
    class FilterStringInput

      def to_html
        super
      end

    end
  end
end
@AnalogJ

Hey @minktom any chance you're going to submit a pull request?

@sapienza

@minktom Nice Monkey patch!!! you should work on it and submit a pull request :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment