Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RailsAdmin filter by certain fields only

Is that possible to configure rails admin to filter by certain field only, as right now it can search by all of the column and it is slow.

enter image description here

Apparently my add filter button didn't show up the fields as well after I customize the index page. Here's my setting under my model file:

enter image description here

rails_admin do |config|
  list do
    field :application_id 
    field :release_date
    field :title
    field :detail

    sort_by :release_date
    sort_reverse true
  end
end

How do I customise to search by certain field only and customise add filter options.

like image 431
TonyTakeshi Avatar asked Dec 11 '25 07:12

TonyTakeshi


1 Answers

The documentation says we can turn off searching on certain fields with

field :created_at do
  searchable false
end

You can configure the options for filters, but it seems to accept only an array of fields:

filters [:name, :manager]
like image 155
Michael Hellein Avatar answered Dec 12 '25 23:12

Michael Hellein