gregbell/active_admin — Issue #868: Filters trouble with multiple belongs_to
Author: denispeplin
Created: 2011-12-22 13:25:22+00:00
State: open

Code:

class PppUser < ActiveRecord::Base
set_primary_key :id
belongs_to :PppGroup, foreign_key: :group_id
belongs_to :Contract, foreign_key: 'contract_id'
end

ActiveAdmin.register PppUser do
filter :contract_id
filter :group_id
filter :dsl
filter :pppoe
filter :vpn
end

Only two fields displayed in this filter, :contract_id and :group_id

Others (:dsl, :pppoe, :vpn) not displayed at all.