Increase the limit for result of dropdown in rails_admin

49 views
Skip to first unread message

Asad Khan

unread,
Jun 11, 2021, 6:11:13 AM6/11/21
to rails_admin
Hi, i m beginner to rails so I m not sure if what I m asking does make sense, but what I m trying to do it to increase the result count for a query but I m unable to locate the query.

Started GET "/admin/tag?associated_collection=tags&compact=true&current_action=update&source_abstract_model=video&source_object_id=7732&query=s" for 127.0.0.1 at 2021-06-11 03:04:28 -0700
Processing by RailsAdmin::MainController#index as JSON
  Parameters: {"associated_collection"=>"tags", "compact"=>"true", "current_action"=>"update", "source_abstract_model"=>"video", "source_object_id"=>"7732", "query"=>"s", "model_name"=>"tag"}
  Admin Load (0.2ms)  SELECT  `admins`.* FROM `admins` WHERE `admins`.`id` = 14 ORDER BY `admins`.`id` ASC LIMIT 1
  Video Load (0.2ms)  SELECT  `videos`.* FROM `videos` WHERE `videos`.`id` = 7732 ORDER BY `videos`.`id` ASC LIMIT 1
   (0.1ms)  SELECT COUNT(*) FROM `tags`
  Tag Load (0.2ms)  SELECT  `tags`.* FROM `tags` WHERE ((LOWER(tags.name) LIKE '%s%') OR (LOWER(tags.ui_name) LIKE '%s%')) ORDER BY tags.id desc LIMIT 30
Completed 200 OK in 42ms (Views: 0.8ms | ActiveRecord: 0.6ms)


as should the logs above the LIMIT is set to 30 for tag but I m not sure how to increase it, can anyone of you help?
Thanks in advance
 

D F

unread,
May 25, 2022, 6:47:04 PM5/25/22
to rails_admin
There are some config accessors you can set located here https://github.com/railsadminteam/rails_admin/blob/126f7ac79b2ce7846cbbed7bbca1cc26dfe46fb6/lib/rails_admin/config.rb specifically `default_items_per_page` and `default_associated_collection_limit` that might get you what you need.
Reply all
Reply to author
Forward
0 new messages