What is the difference between filterable, queryable and searchable? #3566
-
Hi, I'm new to rails admin. I don't find the definition of filterable, queryable and searchable in wiki, and I'm confused when implementing searching feature in list view. Can someone explain what is the three xxxable used for? Thank you so much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there. Filterable
By default all fields are filterable. But you can disable it by such: config.model 'Feed' do
list do
configure :name do
filterable false
end
end
end And now my field is gone: Queryable
By default rails_admin searches in rails_admin hits this sql query:
If I disable config.model 'Feed' do
list do
configure :name do
queryable false
end
end
end rails_admin searches only in
Searchable configure :name do
searchable false
end is just an alias for configure :name do
filterable false
queryable false
end But |
Beta Was this translation helpful? Give feedback.
Hi there.
Filterable
Filterable
defines fields that can be filtered with the menu in the top right corner.By default all fields are filterable. But you can disable it by such:
And now my field is gone:
Queryable
Queryable
defines fields, values of which can be searched via this search box:By default rails_admin searches in
id
andname
fields. So if I type there345
on my feed model page,rails_admin hits this sql query: