我有 3 个相关模型:
class Brand < ActiveRecord::Base
has_many :car_models
end
class CarModel < ActiveRecord::Base
has_many :production_years
belongs_to :brand
end
class ProductionYear < ActiveRecord::Base
belongs_to :car_model
end
那么,如果我想按品牌进行过滤,我如何在 ActiveAdmin production_year 部分制作自定义过滤器?那里的默认过滤器:car_model 选择和年份值