activerecord-hackery / meta_search

Object-based searching (and more) for simply creating search forms. Not currently maintained.
http://erniemiller.org/2013/11/17/anyone-interested-in-activerecord-hackery/
MIT License
903 stars 140 forks source link

NoMethodError, undefined method `captures' for nil:NilClass #121

Closed johnjohndoe closed 11 years ago

johnjohndoe commented 11 years ago

I recently updated meta_search to v.1.1.3 and active_admin to v.0.6.1..

When I click on one of the models I receive a NoMethodError:

method_id: "contact_phodoes_not_equal"
method_name: "contact_phodoes_not_equal"
where: #<MetaSearch::Where:0x000000069e3418 @name="does_not_equal", 
@aliases=["ne", "not_eq"], 
@types=[:integer, :float, :decimal, :string, :text, :binary, :date, :datetime, :timestamp, :time, :boolean], 
@cast=nil, 
@predicate=:not_eq, 
@validator=#<Proc:0x00000001b051e8@/home/jjd/.rvm/gems/ruby-1.9.3-p194@myapp/gems/meta_search-1.1.3/lib/meta_search/where.rb:218>, 
@formatter=#<Proc:0x00000001b05210@/home/jjd/.rvm/gems/ruby-1.9.3-p194@myapp/gems/meta_search-1.1.3/lib/meta_search/where.rb:210>, @splat_param=false, 
@skip_compounds=false>

The error occurs in MetaSearch::Builder matches_attribute_method.

The error does not occur when I run meta_search v.1.1.3 and active_admin v.0.5.1..

seanlinsley commented 11 years ago

You should upgrade to Active Admin version 0.6.2: https://github.com/gregbell/active_admin/issues/2504

johnjohndoe commented 11 years ago

Impressing fast bugfix. I hereby confirm that it solve my issue. Thank you!