activeadmin / activeadmin-mongoid

ActiveAdmin hacks to support Mongoid
MIT License
192 stars 210 forks source link

Filters are not working #88

Closed anasW closed 10 years ago

anasW commented 10 years ago

I am using activeadmin-mongoid(0.2.0) with Rails 3.2.14. Here is my code

When I am using this code:

  filter :post_name, :as => :string

it is giving me an error

  undefined method `post_name_contains' for #<Mongoid::Criteria:0xac36c34>

And I am using this code:

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

it is not giving me any error, but it is not working.

Any help would be appreciated.

Thanks

anasW commented 10 years ago

Can anyone help me in that please???

chenkirk commented 10 years ago

What version of Mongoid are you using?

anasW commented 10 years ago

I am using mongoid (~> 3.0).

c2c533c4f237 commented 10 years ago

Do you mean just :name, on the post object?

anasW commented 10 years ago

Yes I want to filter the records based on the post_name....

anasW commented 10 years ago

Any update???

elia commented 10 years ago

No sorry, maybe I should add a note to the readme about broken filter…

anasW commented 10 years ago

Thanks, but I resolved my problem by upgrading activeadmin-mongoid (0.3.0) and activeadmin (~> 0.6)

elia commented 10 years ago

Good to know :)