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 ?
The solution is to override default behavior. In the controller:
Thanks to Drew Ulmer.