gregbell/active_admin — Issue #997: Collections are not (re)loaded in filters
Author: fro
Created: 2012-02-09 21:17:40+00:00
State: open

Hi,

I've created a User model.

In #index I want to be able to filter those fields (position, company, town) by selecting available values but it seems the User.all retrieve always the same set of records even if I add new users:

filter :id
filter :gender, :as => :select, :collection => Interlocutor::GENDERS
filter :last_name
filter :first_name
filter :email
filter :phone
filter :position, :as => :select, :collection => User.all.map(&:position)
filter :company, :as => :select, :collection => User.all.map(&:company)
filter :zipcode
filter :town, :as => :select, :collection => User.all.map(&:town)
filter :created_at
filter :updated_at

I must restart the server to make it work.

Any ideas ?